Guice Team
b8cab7e4e9
Internal change
...
RELNOTES=n/a
PiperOrigin-RevId: 992432967
2026-10-02 11:19:30 -07:00
Guice Team
8eb1cc4d20
Add a function in Guice Elements SPI that returns a list of modules installed by the input module.
...
PiperOrigin-RevId: 828084529
2025-11-04 12:25:36 -08:00
Guice Team
c6839995f3
Tweak Guice to suggest toProvider(() -> null) rather than toProvider(Providers.of(null)).
...
PiperOrigin-RevId: 780105053
2025-07-07 07:39:55 -07:00
Guice Team
e88bc7991e
Do not include exact type matches when showing suggestions for similar bindings that only differ in variance.
...
PiperOrigin-RevId: 723973423
2025-02-06 09:52:16 -08:00
Guice Team
fd77c955a9
Breaks some downstream tests that assumed the error message was written a certain way.
...
PiperOrigin-RevId: 698877656
2024-11-21 12:33:50 -08:00
Guice Team
21381e3f8a
Fix typo JvmWildcards -> JvmWildcard
...
PiperOrigin-RevId: 698484191
2024-11-20 12:40:15 -08:00
Guice Team
74ec25c921
Add Guice hints when dealing with Kotlin declaration site variance.
...
PiperOrigin-RevId: 698431304
2024-11-20 10:10:37 -08:00
Guice Team
e03251852d
Add Guice hints when the only difference between two types is when one is a wildcard type and the other is a non-wildcard type that is mentioned in the extends/super clause of the wildcard type (e.g. Optional<Foo> vs. Optional<? extends Foo>).
...
PiperOrigin-RevId: 696949702
2024-11-15 11:31:49 -08:00
Guice Team
7b8cc467b8
Add better Guice hints when using classes of the same name from different packages.
...
PiperOrigin-RevId: 696172862
2024-11-13 09:56:15 -08:00
Guice Team
d83f6770aa
Load the builtin Bazel java rules from @rules_java
...
PiperOrigin-RevId: 689368258
2024-10-24 07:10:13 -07:00
Guice Team
df10bedd59
Automated Code Change
...
PiperOrigin-RevId: 659586774
2024-08-05 09:56:06 -07:00
Guice Team
2b37f02086
Allow AnonymousClassDefiner class initializer complete normally if running on JDK >=17 with Unsafe.defineAnonymousClass removed.
...
PiperOrigin-RevId: 632544907
2024-05-10 10:57:13 -07:00
Guice Team
42fbaf54bf
If there is an error during HiddenClassDefiner class initialization, record the state in a public boolean field. Change UnsafeClassDefiner to check HiddenClassDefiner state and set UNSAFE_DEFINER as null if there's an error. An IllegalStateException is thrown if HiddenClassDefiner.define() is called in that case.
...
PiperOrigin-RevId: 631862800
2024-05-08 11:14:53 -07:00
Guice Team
1561d4a52c
Add load() statements for the Bazel builtin top-level java symbols
...
Loads are being added in preparation for moving the symbols out of Bazel and into `rules_java`.
PiperOrigin-RevId: 624858712
2024-04-15 00:38:24 -07:00
Guice Team
631e8e015e
Add load() statements for the builtin Bazel java rules
...
Loads are being added in preparation for moving the rules out of Bazel and into `rules_java`.
PiperOrigin-RevId: 621873514
2024-04-04 08:55:43 -07:00
Guice Team
2d4a3952ee
Automated Code Change
...
PiperOrigin-RevId: 619545649
2024-03-27 08:52:52 -07:00
Guice Team
21d26cfc65
Change RealMultibinder#doProvision to use ImmutableSet#buildWithExpectedSize, and avoid an extra T[] array allocation when permitDuplicates==true.
...
Since the normal usage should be that the items in the values array are all unique, and ImmutableSet#copyOf will create an initial list of max(4, sqrt(length)) if length>4, but then grows that list to length (or larger) if the array was all unique (and then resize is back down during build()).
While here, the T[] values array is also only needed to be filled in when permitDuplicates==false (for the error message if duplicates were detected).
PiperOrigin-RevId: 597244931
2024-01-10 07:34:13 -08:00
Guice Team
e23d3b4369
Internal change.
...
PiperOrigin-RevId: 581989087
2023-11-13 09:27:34 -08:00
Guice Team
87d262c4d7
Remove stale comment
...
PiperOrigin-RevId: 578574921
2023-11-01 11:06:46 -07:00
Guice Team
cf435821de
Move exports to public target
...
PiperOrigin-RevId: 578306054
2023-10-31 14:38:10 -07:00
Guice Team
cd19219013
Internal change
...
PiperOrigin-RevId: 577308018
2023-10-30 13:27:06 -07:00
Guice Team
1ab911ad26
Internal change
...
PiperOrigin-RevId: 576885259
2023-10-30 13:05:04 -07:00
Guice Team
73dc9f3b8a
Add a workaround to unbreak the gen_maven_artifact invocation.
...
PiperOrigin-RevId: 573252178
2023-10-13 10:13:19 -07:00
Guice Team
6e9176dce0
Fix some typos in Guice comments.
...
PiperOrigin-RevId: 571969961
2023-10-09 10:08:32 -07:00
Guice Team
db5bcc20f9
Make AbstractModule.binder private, for a hair more encapsulation.
...
PiperOrigin-RevId: 555492476
2023-08-10 08:01:45 -07:00
Guice Team
ddb6315362
Fixup for a common typo.
...
PiperOrigin-RevId: 547836342
2023-07-13 10:10:21 -07:00
Guice Team
6412858fca
Internal change.
...
PiperOrigin-RevId: 538300298
2023-06-06 15:00:05 -07:00
Guice Team
06e8bb1ea1
Clarify that Multibinder elements need not be distinct if permitDuplicates() is specified.
...
PiperOrigin-RevId: 517978849
2023-03-20 08:43:58 -07:00
Guice Team
f26a731e3d
Fix typo in jdoc.
...
PiperOrigin-RevId: 516590803
2023-03-14 11:54:26 -07:00
Guice Team
4a8965a899
Automated visibility attribute cleanup.
...
PiperOrigin-RevId: 505840946
2023-01-30 17:17:48 -08:00
Guice Team
9ed45ab2c6
Open-source @Keep on Guice annotations.
...
PiperOrigin-RevId: 503916049
2023-01-23 01:19:00 -08:00
Guice Team
294065ccc1
All testing uses Mockito instead of EasyMock.
...
PiperOrigin-RevId: 498600399
2022-12-30 09:45:27 -08:00
Guice Team
7014486812
Internal change
...
PiperOrigin-RevId: 457864874
2022-06-29 11:16:41 -07:00
Guice Team
c7a74a108b
Create a separate target for ProvidedBy.
...
PiperOrigin-RevId: 448523332
2022-05-13 10:18:34 -07:00
Guice Team
2098d6ad4e
no visible change.
...
PiperOrigin-RevId: 436491064
2022-05-02 18:55:18 -07:00
Guice Team
8405f90aa9
no visible change.
...
PiperOrigin-RevId: 435724165
2022-03-18 13:41:21 -07:00
Guice Team
b32439cc99
no visible change
...
PiperOrigin-RevId: 435193059
2022-03-16 16:38:54 -07:00
Guice Team
7eddc637b6
no visible change.
...
PiperOrigin-RevId: 433299107
2022-03-08 13:41:20 -08:00
Guice Team
d65df48ba5
Exclude Kotlin extensions for now since the build setup does not support it yet.
...
PiperOrigin-RevId: 432524021
2022-03-04 13:50:22 -08:00
Guice Team
bb59fbfe99
no visible change.
...
PiperOrigin-RevId: 432517529
2022-03-04 13:19:12 -08:00
Guice Team
86e7ab75b3
Add osgi_jar bazel rule to generate OSGi bundle.
...
PiperOrigin-RevId: 432496763
2022-03-04 11:42:28 -08:00
Guice Team
b2554223cc
LSC: Fix or suppress ignored return values from instance methods on an Object.
...
PiperOrigin-RevId: 429675699
2022-02-18 16:54:46 -08:00
Guice Team
a565b63eae
Validate that the transitively exported targets matches what is set in gen_maven_artifact.
...
PiperOrigin-RevId: 428634587
2022-02-14 16:20:43 -08:00
Guice Team
e44c218056
Remove reference to deleted service extension target.
...
PiperOrigin-RevId: 427067619
2022-02-07 18:00:18 -08:00
Guice Team
37635c29f3
link to latest javadoc on README page.
...
PiperOrigin-RevId: 427057238
2022-02-07 17:04:41 -08:00
Guice Team
08b7893356
Fix publish-latest-docs script.
...
Need to check if the latest api directory exists before deleting it, otherwise git complains about non-existing path: fatal: pathspec 'api-docs/latest' did not match any files.
PiperOrigin-RevId: 427042438
2022-02-07 16:04:18 -08:00
Guice Team
ad77056d77
Fix Javadoc that fails when running with Java 9+.
...
Also:
- configure bazel and maven to use the same -Xdoclint option
- skip maven tests when generating javadoc and API diffs
- fix shell script to fail when any command returned non-zero exit code
- fix issue with the script that errors when trying to generate API diffs for module that does not contain Java doc (e.g extensions-parent)
PiperOrigin-RevId: 427018267
2022-02-07 14:31:32 -08:00
Guice Team
c118f26385
Add steps in the ci workflow to build and test local artifacts.
...
Also:
- cache more bazel files to speed up executation
- use java version as part of the cache key since it is part of the input bazel uses
- fix maven_gen_artfiacts for libries that export other libries
PiperOrigin-RevId: 426955192
2022-02-07 10:35:41 -08:00
Guice Team
d83603377b
Fix publish-snapshot action by passing secrets as env variables.
...
PiperOrigin-RevId: 426488409
2022-02-04 14:10:10 -08:00
Guice Team
ab0ae07c58
Fix publish-snapshot action.
...
PiperOrigin-RevId: 426443027
2022-02-04 10:57:16 -08:00
Guice Team
d291cdd942
generate artifact for guice-bom.
...
PiperOrigin-RevId: 426426988
2022-02-04 09:55:01 -08:00
Guice Team
0b0d6975c7
Fix publish-snapshot action path.
...
PiperOrigin-RevId: 426424508
2022-02-04 09:44:01 -08:00
Guice Team
65b2fdff04
Split workflow into composite actions so that they can be reused for the new release workflow.
...
PiperOrigin-RevId: 426195026
2022-02-03 11:23:32 -08:00
Guice Team
3cd3868b65
Add a simple example maven project that uses Guice.
...
A follow up change will add a test that uses the local published artifact to verify that a project can use the built artifacts.
PiperOrigin-RevId: 426172762
2022-02-03 10:01:24 -08:00
Guice Team
909558ec1a
Remove outdated example.
...
PiperOrigin-RevId: 425983060
2022-02-02 14:47:50 -08:00
Guice Team
757d472e6c
Add support to build maven artifacts using bazel.
...
The setup is mostly based on Dagger's setup and simplified. Further changes might be required to ensure that we are actually deploying the same artifacts as existing maven setup.
PiperOrigin-RevId: 425912979
2022-02-02 10:22:39 -08:00
Guice Team
155bc42345
Remove service and mini extensions.
...
PiperOrigin-RevId: 424972746
2022-01-28 15:37:29 -08:00
Guice Team
a7822f7237
Update how javadoc is built.
...
- enable groups to follow current maven setup
- exclude internal packages and service package since the code isn't actually published
- update external doc links
PiperOrigin-RevId: 424912814
2022-01-28 11:12:48 -08:00
Guice Team
2a4df0a72e
Bump Spring dependency version to 5.3.14.
...
PiperOrigin-RevId: 424761764
2022-01-27 19:10:21 -08:00
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
6ff6e6d88c
update readme to link to latest release.
...
PiperOrigin-RevId: 423950848
2022-01-24 17:27:08 -08:00
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
6d503098ff
upgrade easy mock versions and enable tests against Java 17.
...
PiperOrigin-RevId: 423400922
2022-01-21 14:01:55 -08:00
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
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
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
1c57d16158
Add javadoc targets for Guice libraries.
...
PiperOrigin-RevId: 422867497
2022-01-19 11:48:30 -08:00
Guice Team
f7abab4bb3
fix java-version property for publish workflow.
...
PiperOrigin-RevId: 422652617
2022-01-18 14:47:38 -08:00
Guice Team
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
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
b7e5e331d2
Internal change.
...
PiperOrigin-RevId: 421158735
2022-01-12 11:40:14 -08:00
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
240406ceaf
Internal change.
...
PiperOrigin-RevId: 420766497
2022-01-10 08:21:35 -08:00
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
0ce94279a1
Upgrade struct2 dependency version to 2.3.37.
...
PiperOrigin-RevId: 409001068
2021-11-10 16:07:13 -08:00
Guice Team
34eca95f9e
Make ServletScopes final.
...
PiperOrigin-RevId: 408431479
2021-11-08 13:46:29 -08:00
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
0477f05101
Disable support for injection into local Kotlin classes.
...
PiperOrigin-RevId: 395992007
2021-09-10 13:10:33 -07:00
Guice Team
7d7e3da20c
No visible change.
...
PiperOrigin-RevId: 382141204
2021-06-29 12:31:41 -07:00
Guice Team
c1c1a763d0
Remove unneeded Thread.yield() statement from test.
...
PiperOrigin-RevId: 373631407
2021-05-13 12:23:10 -07:00
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
1dbfbce488
Explain why ErrorsException is ignored in createJustInTimeBindingRecursive internal method.
...
PiperOrigin-RevId: 373157192
2021-05-11 08:33:09 -07:00
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
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
6fc8ad454a
no visible change.
...
PiperOrigin-RevId: 367246328
2021-04-07 10:25:08 -07:00
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
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
54cccd3406
bump snapshot version, update README & prior API xml
...
PiperOrigin-RevId: 360302867
2021-03-01 16:23:20 -08:00
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
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
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
6fa83e476a
Add missing @since methods
...
PiperOrigin-RevId: 359326331
2021-02-24 11:11:23 -08:00
Guice Team
96e835f098
Update @since tags
...
PiperOrigin-RevId: 359195197
2021-02-23 20:12:19 -08:00
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
826a97fced
Update the description for Key class.
...
PiperOrigin-RevId: 356859347
2021-02-10 16:51:38 -08:00
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
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
e292838c89
Add a CI status badge.
...
PiperOrigin-RevId: 354580188
2021-01-29 11:57:18 -08:00
Guice Team
a26bb0100b
Update workflow to cache maven packages.
...
PiperOrigin-RevId: 354555203
2021-01-29 10:06:13 -08:00
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