Guice Team and Guice Team
2a4df0a72e
Bump Spring dependency version to 5.3.14.
...
PiperOrigin-RevId: 424761764
2022-01-27 19:10:21 -08:00
Guice Team and Guice Team
3761753f4f
specific the source and target level in javac options to target Java 8.
...
PiperOrigin-RevId: 424661645
2022-01-27 11:19:31 -08:00
Guice Team and Guice Team
6ff6e6d88c
update readme to link to latest release.
...
PiperOrigin-RevId: 423950848
2022-01-24 17:27:08 -08:00
Guice Team and Guice Team
6925c5c253
bump snapshot version, update README & prior API xml after 5.1.0 release.
...
closes #1536
PiperOrigin-RevId: 423946861
2022-01-24 17:05:16 -08:00
Guice Team and Guice Team
6d503098ff
upgrade easy mock versions and enable tests against Java 17.
...
PiperOrigin-RevId: 423400922
2022-01-21 14:01:55 -08:00
Guice Team and Guice Team
c4854d5cf5
Fix tests that break with Java 17 base on suggestions from @mcculls https://github.com/google/guice/issues/1536#issuecomment-1017894441
...
- skip reflection fallback test that only works for java version < 17
- add required jvm flags to mirror maven setup
- upgrade mockito version
PiperOrigin-RevId: 423389524
2022-01-21 13:07:56 -08:00
Guice Team and Guice Team
bc960c5c05
Generate test suite to run tests under a package.
...
This reduces the test time from ~9 minutes to ~3 minutes.
PiperOrigin-RevId: 423146320
2022-01-20 13:34:54 -08:00
Guice Team and Guice Team
1acb91cfff
Run bazel test in ci workflow.
...
Also update gitignore file to ingore bazel generated output and skip the deploy doc/snapshot job if not the main repo.
PiperOrigin-RevId: 422908745
2022-01-19 14:45:44 -08:00
Guice Team and Guice Team
1c57d16158
Add javadoc targets for Guice libraries.
...
PiperOrigin-RevId: 422867497
2022-01-19 11:48:30 -08:00
Guice Team and Guice Team
f7abab4bb3
fix java-version property for publish workflow.
...
PiperOrigin-RevId: 422652617
2022-01-18 14:47:38 -08:00
Guice Team and Xiaoming Jia
dea06c1087
Make Guice builds with bazel.
...
This change only makes it possible to build with bazel and no changes to existing maven setup yet.
PiperOrigin-RevId: 422630465
2022-01-18 13:31:43 -08:00
Guice Team and Guice Team
bbd2f0d384
Remove jdk8-tests module since Guice now targets Java 8 and above by default.
...
PiperOrigin-RevId: 421354790
2022-01-12 11:40:38 -08:00
Guice Team and Guice Team
b7e5e331d2
Internal change.
...
PiperOrigin-RevId: 421158735
2022-01-12 11:40:14 -08:00
Guice Team and Guice Team
d88175a45b
Delete a few classes that are not actually tests.
...
PiperOrigin-RevId: 420898057
2022-01-10 17:37:17 -08:00
Guice Team and Guice Team
240406ceaf
Internal change.
...
PiperOrigin-RevId: 420766497
2022-01-10 08:21:35 -08:00
Guice Team and Guice Team
60fddb2c28
Provide a non-empty name for the test cookie.
...
PiperOrigin-RevId: 410290707
2021-11-16 10:32:16 -08:00
Guice Team and Guice Team
0ce94279a1
Upgrade struct2 dependency version to 2.3.37.
...
PiperOrigin-RevId: 409001068
2021-11-10 16:07:13 -08:00
Guice Team and Guice Team
34eca95f9e
Make ServletScopes final.
...
PiperOrigin-RevId: 408431479
2021-11-08 13:46:29 -08:00
Guice Team and Guice Team
2aefd54946
Remove COMPLETE option for flag guice_include_stack_traces.
...
This option does not provide much benefits and doesn't even work correctly in some cases.
PiperOrigin-RevId: 407408634
2021-11-03 13:12:03 -07:00
Guice Team and Guice Team
0477f05101
Disable support for injection into local Kotlin classes.
...
PiperOrigin-RevId: 395992007
2021-09-10 13:10:33 -07:00
Guice Team and Guice Team
7d7e3da20c
No visible change.
...
PiperOrigin-RevId: 382141204
2021-06-29 12:31:41 -07:00
Guice Team and Guice Team
c1c1a763d0
Remove unneeded Thread.yield() statement from test.
...
PiperOrigin-RevId: 373631407
2021-05-13 12:23:10 -07:00
Guice Team and Guice Team
738d317387
Fix bug in UriEncoder that interpreted and stripped numeric prefixes.
...
RELNOTES=Fix bug in UriEncoder that interpreted and stripped numeric prefixes.
PiperOrigin-RevId: 373550033
2021-05-13 03:53:56 -07:00
Guice Team and Guice Team
1dbfbce488
Explain why ErrorsException is ignored in createJustInTimeBindingRecursive internal method.
...
PiperOrigin-RevId: 373157192
2021-05-11 08:33:09 -07:00
Guice Team and Guice Team
e960b66d3d
Handle kotlin object declaration with permit annotations.
...
If the permit annotation is placed before the object keyword then the annotation will be present on the anonymous class. So this change update BoundFieldModule.WithPermits to also check annotations on the anonymous class itself.
PiperOrigin-RevId: 367707010
2021-04-09 14:42:59 -07:00
Guice Team and Guice Team
053d0a5f29
Update workflow to cancel previous runs and upgrade to setup-java@v2.
...
PiperOrigin-RevId: 367692521
2021-04-09 13:23:53 -07:00
Guice Team and Guice Team
6fc8ad454a
no visible change.
...
PiperOrigin-RevId: 367246328
2021-04-07 10:25:08 -07:00
Guice Team and Guice Team
dc7f4858f9
Support TYPE_USE type Nullable annotations.
...
This change only add support for top level annotation like `@Nullable List<String>` and not `List<@Nullable String>`.
PiperOrigin-RevId: 361592529
2021-03-08 10:00:47 -08:00
Guice Team and Guice Team
27ae45775c
Add a script to diff release jars with new release to do a quick check before approving the new release in maven central.
...
PiperOrigin-RevId: 360546122
2021-03-02 16:54:50 -08:00
Guice Team and Guice Team
54cccd3406
bump snapshot version, update README & prior API xml
...
PiperOrigin-RevId: 360302867
2021-03-01 16:23:20 -08:00
Guice Team and Guice Team
e09d1eebd0
Add back build.properties files that were still used.
...
PiperOrigin-RevId: 359826559
2021-02-26 13:28:21 -08:00
Guice Team and Guice Team
2872237b01
Throw an error if there is no MapKey annotation on @IntoMap dagger provider methods.
...
PiperOrigin-RevId: 359792774
2021-02-26 10:53:57 -08:00
Guice Team and Guice Team
9dc98cb7c7
Add a test to verify that failure in scanning one key doesn't effect other bindings that depends on the key.
...
PiperOrigin-RevId: 359786415
2021-02-26 10:25:14 -08:00
Guice Team and Guice Team
6fa83e476a
Add missing @since methods
...
PiperOrigin-RevId: 359326331
2021-02-24 11:11:23 -08:00
Guice Team and Guice Team
96e835f098
Update @since tags
...
PiperOrigin-RevId: 359195197
2021-02-23 20:12:19 -08:00
Guice Team and Guice Team
df622abf7c
Fixing javadoc, map bindings were actually implemented some time ago
...
PiperOrigin-RevId: 356987382
2021-02-11 09:08:19 -08:00
Guice Team and Guice Team
826a97fced
Update the description for Key class.
...
PiperOrigin-RevId: 356859347
2021-02-10 16:51:38 -08:00
Guice Team and Guice Team
015ed75b5c
Restore the default method log message to WARNING level.
...
The test failures due to unexpected log messages are now resolved.
PiperOrigin-RevId: 355880552
2021-02-05 10:39:38 -08:00
Guice Team and Guice Team
f78f7cfb3b
Temporarily down grade the warning to INFO level.
...
The warning is causing some test failures due to unexpected log messages.
PiperOrigin-RevId: 355507369
2021-02-03 16:25:41 -08:00
Guice Team and Guice Team
e292838c89
Add a CI status badge.
...
PiperOrigin-RevId: 354580188
2021-01-29 11:57:18 -08:00
Guice Team and Guice Team
a26bb0100b
Update workflow to cache maven packages.
...
PiperOrigin-RevId: 354555203
2021-01-29 10:06:13 -08:00
Guice Team and Guice Team
62276f87be
Configure github actions to publish latest javadoc and snapshot after a success test run.
...
PiperOrigin-RevId: 354360420
2021-01-28 11:51:21 -08:00
Guice Team and Xiaoming Jia
345316ace8
Initial setup for migrating from Travis to Github Actions.
...
Closes #1456
ORIGINAL_AUTHOR=Carl Dea <carl.dea@gmail.com >
PiperOrigin-RevId: 353906843
2021-01-26 15:02:06 -08:00
Guice Team and Guice Team
2157fa9f12
revert support for TYPE_USE Nullable annotation.
...
PiperOrigin-RevId: 353872238
2021-01-26 08:29:20 -08:00
Guice Team and Guice Team
1a410a8bef
Support TYPE_USE type Nullable annotations.
...
This change only add support for top level annotation like `@Nullable List<String>` and not `List<@Nullable String>`.
PiperOrigin-RevId: 353053953
2021-01-21 10:52:18 -08:00
Guice Team and Guice Team
a81072df06
Add an error when an injected constructor parameter's binding annotation's @Target does not include AnnotationTarget.PARAMETER.
...
PiperOrigin-RevId: 351170781
2021-01-11 09:33:42 -08:00
Guice Team and Guice Team
5ea05c3ede
Handle binding and injecting nullable kotlin properties.
...
PiperOrigin-RevId: 350666094
2021-01-07 17:02:53 -08:00
Guice Team and Guice Team
fdfc81cde4
Refactor conditional support for Kotlin features.
...
PiperOrigin-RevId: 350358874
2021-01-06 08:36:48 -08:00
Guice Team and Guice Team
dc5a782524
Add support for reading annotations on Kotlin properties.
...
PiperOrigin-RevId: 347864065
2020-12-16 11:40:52 -08:00
Guice Team and Guice Team
15ce8eb669
Avoid defensive clone() in ParameterizedType.getActualTypeArguments() when possible.
...
PiperOrigin-RevId: 347701829
2020-12-15 15:12:54 -08:00
Guice Team and Guice Team
363f568b6d
Fix quadratic behavior of AbstractProcessor.process() observed in profiles.
...
The received lists are always ArrayList, for which removing items one-by-one
from the left is inefficient.
This changes the behavior on exception. Unlike std::remove_if,
ArrayList.removeIf() buffers all filter results before shifting any elements.
PiperOrigin-RevId: 347469725
2020-12-14 14:27:57 -08:00
Guice Team and Guice Team
2712230640
Fix formatting of source with module stack. Add NullInjectedIntoNonNullable tests.
...
PiperOrigin-RevId: 346890324
2020-12-10 16:30:51 -08:00
Guice Team and Guice Team
e399b21ab8
Split generate-latest-docs.sh script into two script: one generates the docs and one generates and publishes them.
...
This will allow us to generate the released version of the api docs as part of release process.
PiperOrigin-RevId: 345773223
2020-12-04 15:50:59 -08:00
Guice Team and Guice Team
ed6993aa14
Delete ant related build files.
...
PiperOrigin-RevId: 345749534
2020-12-04 13:51:03 -08:00
Guice Team and Guice Team
79660ea0f5
Update github access token used for publishing api docs.
...
PiperOrigin-RevId: 345726340
2020-12-04 11:57:27 -08:00
Guice Team and Guice Team
4b4b9a6fa8
Run mvn install to install snapshot artifact before running jdiff.
...
PiperOrigin-RevId: 345714487
2020-12-04 11:05:55 -08:00
Guice Team and Guice Team
9c7fe49c7a
Fix bash script for publishing latest api docs.
...
Using `/bin/sh` cause an "unexpected operator" so remove it.
PiperOrigin-RevId: 345708574
2020-12-04 10:40:30 -08:00
Guice Team and Guice Team
07d13be147
Change to use jdiff maven plugin to generate API diffs.
...
The plugin is configured to diff the current version against last released version of the API.
Unlike the jdiff task run by ant, this plugin generates diff on a per module basis. So the script used to generate latest docs is updated to copy over per module API diffs into a single directory with a index page that links to each module's diffs.
Also fixed travis CI config to remove the docs configuration since the javadoc
and api diffs are now generated using maven.
PiperOrigin-RevId: 345697612
2020-12-04 09:52:37 -08:00
Guice Team and Guice Team
a795fcc1b8
Clarify wording of the MissingConstructor Guice error message
...
PiperOrigin-RevId: 345502715
2020-12-03 11:57:18 -08:00
Guice Team and Guice Team
413d0d5dba
Configure maven-javadoc-plugin to group modules into separate tabs.
...
PiperOrigin-RevId: 345329769
2020-12-02 15:51:57 -08:00
Guice Team and Guice Team
70062306db
Update BoundFieldModule description to be more specific about what it does.
...
PiperOrigin-RevId: 345252174
2020-12-02 09:49:56 -08:00
Guice Team and Guice Team
338d0039c1
Add documentation for AbstractBindingBuilder.
...
PiperOrigin-RevId: 340925080
2020-11-05 14:07:24 -08:00
Guice Team and Guice Team
6eaf556c8b
Fix ServletConfig.getInitParameterNames return type.
...
Closes #1440 .
PiperOrigin-RevId: 339960006
2020-10-30 16:30:10 -07:00
Guice Team and Guice Team
59640fa0df
Fix release page link.
...
PiperOrigin-RevId: 339944405
2020-10-30 14:52:17 -07:00
Guice Team and Guice Team
383d377436
Bump snapshot version, update README & prior API xml
...
PiperOrigin-RevId: 339910400
2020-10-30 11:43:16 -07:00
Guice Team and Guice Team
b1975a7c29
Update dagger jar used by ant to match the actual version used in maven.
...
PiperOrigin-RevId: 339701941
2020-10-29 10:53:18 -07:00
Guice Team and Guice Team
c79a90405a
Delete unused build property.
...
PiperOrigin-RevId: 339501190
2020-10-28 11:28:10 -07:00
Guice Team and Guice Team
9e7afde656
Documentation nit: update text to match variable name.
...
PiperOrigin-RevId: 339493357
2020-10-28 10:55:31 -07:00
Guice Team and Guice Team
f3f8fc0c7c
Update the AbstractModule javadoc
...
PiperOrigin-RevId: 339493051
2020-10-28 10:52:53 -07:00
Guice Team and Guice Team
dc6a1657db
Run tests against openjdk-15.
...
PiperOrigin-RevId: 339133656
2020-10-26 15:41:36 -07:00
Guice Team and Guice Team
2de2311318
Update FactoryProvider2 to support Java 15.
...
The private constructor used in looking up method handles has changed to take an extra parameter. This change update the code to look for both constructor signatures.
PiperOrigin-RevId: 339124988
2020-10-26 15:00:30 -07:00
Guice Team and Guice Team
8b2a048a71
Fix BoundFieldModuleTest to run with Java 15.
...
PiperOrigin-RevId: 339039746
2020-10-26 08:09:52 -07:00
Guice Team and Guice Team
b256703850
Remove multibindings extension, it has been part of Guice core since 4.2 release.
...
Also clean up no_aop build variant from BOM.
PiperOrigin-RevId: 338771054
2020-10-23 17:03:44 -07:00
Guice Team and Guice Team
ba5b90a9f6
Update ASM to version 9.0.
...
Closes #1400
PiperOrigin-RevId: 338751330
2020-10-23 15:00:54 -07:00
Guice Team and Guice Team
80b91afae2
Update tests to support running with Java 15.
...
In Java 15, the annotation `toString` implementation omits the member name.
PiperOrigin-RevId: 338746927
2020-10-23 14:37:28 -07:00
Guice Team and Guice Team
b97095d388
Delete obsolete methods in Messages and migrate callers to use equivalent methods in SourceFormatter.
...
PiperOrigin-RevId: 338582362
2020-10-22 17:32:37 -07:00
Guice Team and Guice Team
d3df2d5854
Delete deprecated dependency stack APIs.
...
PiperOrigin-RevId: 338343877
2020-10-21 14:44:42 -07:00
Guice Team and Guice Team
50e7c7e02c
Remove obsolete error message flag and clean up dead code.
...
PiperOrigin-RevId: 338104581
2020-10-20 11:55:35 -07:00
Guice Team and Guice Team
5caa549395
Enable the new Guice error messages.
...
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337602195
2020-10-16 16:55:03 -07:00
Guice Team and Guice Team
9a8e46716e
Revert previous change because it broke some tests when running with openjdk8.
...
PiperOrigin-RevId: 337517262
2020-10-16 09:13:55 -07:00
Guice Team and Guice Team
2c8c7fed12
Enable the new Guice error messages.
...
Changes include:
- update Guice tests that asserts error messages
- export new errors tests
- update Guice compiler flag so parameter names are available at runtime, which is required for the errors tests
PiperOrigin-RevId: 337401912
2020-10-15 16:06:22 -07:00
Guice Team and Guice Team
1ae63eb443
Strip embedded class name legend in the case that one Guice error is included in another Guice error.
...
PiperOrigin-RevId: 336366033
2020-10-09 14:30:12 -07:00
Guice Team and Guice Team
0781568a6c
Fix test when bytecode generation is disabled.
...
PiperOrigin-RevId: 336311235
2020-10-09 09:51:37 -07:00
Guice Team and Guice Team
dd873be400
Remove AOP build variant.
...
Changes include:
- skip tests that are testing bytecode generation enabled behaviors
- make line number and source file name information available even when bytecode generation is disabled since it does not use bytecode generation and makes testing easier (some tests rely on the information being available)
- update maven pom files to stop producing a no-aop version of Guice
- added test profile to execute tests with bytecode generation disabled
PiperOrigin-RevId: 336306344
2020-10-09 09:23:54 -07:00
Guice Team and Guice Team
6c6eb52332
Rename guice_aop_option flag to guice_bytecode_gen_option.
...
This makes it explicit that the flag controls whether Guice uses bytecode generation at runtime and not just method interception (AOP).
PiperOrigin-RevId: 336196985
2020-10-08 17:19:56 -07:00
Guice Team and Guice Team
36b710d441
Add internal support for recognizing Kotlin nullability in Guice. This will be available publicly in a later CL.
...
PiperOrigin-RevId: 335965575
2020-10-07 15:29:19 -07:00
Guice Team and Guice Team
deb5a1b3f0
Add an option to control whether AOP is enabled or not.
...
Also remove some unnecessary methods by inlining the calls.
PiperOrigin-RevId: 335917232
2020-10-07 11:47:10 -07:00
Guice Team and Guice Team
3bc61ccec2
Add internal support for recognizing Kotlin nullability in Guice. This will be available publicly in a later CL.
...
PiperOrigin-RevId: 335756454
2020-10-06 17:25:44 -07:00
Guice Team and Guice Team
b7cadc1cfa
Migrate several tests to junit4 so that tests that rely on AOP can be skipped using Assume.assumeTrue.
...
PiperOrigin-RevId: 335755255
2020-10-06 17:18:53 -07:00
Guice Team and Guice Team
b0e5ade45e
Add internal support for recognizing Kotlin nullability in Guice. This will be available publicly in a later CL.
...
PiperOrigin-RevId: 335739263
2020-10-06 15:59:25 -07:00
Guice Team and Guice Team
690e189a7d
Use assumeTrue to skip tests that only need to run under certain conditions.
...
This requires migrating some tests from JUnit3 to JUnit4.
PiperOrigin-RevId: 335094691
2020-10-02 13:55:43 -07:00
Guice Team and Guice Team
98f977662f
Fix the command used to print out failed tests results.
...
There are multiple target directories that can have tests report files and they are not located at the root directory. So Change to use grep find reports with failed tests instead.
PiperOrigin-RevId: 335054160
2020-10-02 10:36:54 -07:00
Guice Team and Guice Team
4312765380
Print out the test report if there are any test failures.
...
PiperOrigin-RevId: 334849942
2020-10-01 10:53:03 -07:00
Guice Team and Guice Team
67c957b5e4
Include the @RestrictedBindingSource explanation as a missing binding suggestion.
...
PiperOrigin-RevId: 334803319
2020-10-01 06:48:28 -07:00
Guice Team and Guice Team
9997527a93
Quote the duplicate key in DuplicateMapKeyError.
...
This will ensure that the key will not be modified by Guice's package name compressor.
Also fix package name compressor to handle single letter class names.
PiperOrigin-RevId: 334653432
2020-09-30 12:24:00 -07:00
Guice Team and Guice Team
471a25f1c7
Do not compress package names in string literals.
...
Previously any string that matches the package name pattern will be shortened and this is undesirable when the text is not actually meant to be interpreted as a package name.
This change gives user a way to disable the package name compressor by putting the text in double quotation marks.
PiperOrigin-RevId: 334254171
2020-09-28 15:48:31 -07:00
Guice Team and Guice Team
fae2e289df
Internal change.
...
PiperOrigin-RevId: 332883178
2020-09-21 10:42:42 -07:00
Guice Team and Guice Team
0beaff51e0
Add a check for OptionalBinder infinite recursion.
...
When an optional binder binding was linked to the same class like below, infinite recursion occurs. There is a check for recursive binding in BindingProcessor class for all linked bindings but that did not work for OptionalBinder since OptionalBinder original key annotation is wrapped into something. So, comparing the original key and linked binding key didn't work.
Added a check for that.
Example:
```
OptionalBinder.newOptionalBinder(binder(), MyClass.class)
.setBinding()
.to(MyClass.class);
```
PiperOrigin-RevId: 332062297
2020-09-16 12:29:41 -07:00
Guice Team and Guice Team
9b45ad8536
Tweak DuplicateMapKeyError so the summary include what the duplicate key is.
...
This makes it easier to assert the error in user code since people usually care about what the duplicate keys are.
PiperOrigin-RevId: 330613716
2020-09-08 16:42:17 -07:00
Guice Team and Guice Team
fb63a55517
Roll forward with fixes and an extra test.
...
*** Original change description ***
Support custom formatting for CHILD_BINDING_ALREADY_SET error.
PiperOrigin-RevId: 329793504
2020-09-02 14:53:44 -07:00