-
Notifications
You must be signed in to change notification settings - Fork 356
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add module-info.java to checker-qual #6326
Merged
Merged
Changes from all commits
Commits
Show all changes
13 commits
Select commit
Hold shift + click to select a range
52ee5a7
add module-info.java to checker-qual
mtf90 b48b340
Merge branch 'master' into module-info
mernst 24fb8b6
Update package name
mernst 5888b5d
disable module-path in other javadoc invocations as well
mtf90 9698354
reorder module-info statements
mtf90 308ae37
build all files with Java 9
mtf90 802539a
reorder items
mtf90 0968dee
further exclusions
mtf90 21e8632
use previous exclusion semantics again
mtf90 97e77f2
update contributors
mtf90 bf0ed60
actually include module-info in java9 compilation
mtf90 2dfb910
drop redundant configs
mtf90 70e7253
Merge branch 'master' into module-info
mernst File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
/** | ||
* This module contains annotations (type qualifiers) that a programmer writes to specify Java code | ||
* for type-checking by the Checker Framework. | ||
*/ | ||
module org.checkerframework.checker.qual { | ||
// javadoc-only dependencies | ||
requires static java.compiler; | ||
requires static java.desktop; | ||
requires static jdk.compiler; | ||
|
||
// the .jar file (for the Automatic-Module-Name) is not ready during javadoc | ||
// requires static org.checkerframework.checker; | ||
|
||
exports org.checkerframework.checker.builder.qual; | ||
exports org.checkerframework.checker.calledmethods.qual; | ||
exports org.checkerframework.checker.compilermsgs.qual; | ||
exports org.checkerframework.checker.fenum.qual; | ||
exports org.checkerframework.checker.formatter.qual; | ||
exports org.checkerframework.checker.guieffect.qual; | ||
exports org.checkerframework.checker.i18n.qual; | ||
exports org.checkerframework.checker.i18nformatter.qual; | ||
exports org.checkerframework.checker.index.qual; | ||
exports org.checkerframework.checker.initialization.qual; | ||
exports org.checkerframework.checker.interning.qual; | ||
exports org.checkerframework.checker.lock.qual; | ||
exports org.checkerframework.checker.mustcall.qual; | ||
exports org.checkerframework.checker.nullness.qual; | ||
exports org.checkerframework.checker.optional.qual; | ||
exports org.checkerframework.checker.propkey.qual; | ||
exports org.checkerframework.checker.regex.qual; | ||
exports org.checkerframework.checker.signature.qual; | ||
exports org.checkerframework.checker.signedness.qual; | ||
exports org.checkerframework.checker.tainting.qual; | ||
exports org.checkerframework.checker.units.qual; | ||
exports org.checkerframework.common.aliasing.qual; | ||
exports org.checkerframework.common.initializedfields.qual; | ||
exports org.checkerframework.common.reflection.qual; | ||
exports org.checkerframework.common.returnsreceiver.qual; | ||
exports org.checkerframework.common.subtyping.qual; | ||
exports org.checkerframework.common.util.count.report.qual; | ||
exports org.checkerframework.common.value.qual; | ||
exports org.checkerframework.dataflow.qual; | ||
exports org.checkerframework.framework.qual; | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If this is really for Javadoc only, wouldn't it be cleaner to remove those
requires static
statements and replace them by--add-reads
options when invoking thejavadoc
tool?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Technically, you can even skip the
--add-reads
because the javadoc phase does not read the module descriptor (due to circular dependencies which are not allowed with JPMS).I mainly added them to be as explicit as possible with the dependency declarations. For example, IntelliJ would flag even more references if these dependencies were not specified. I don't know how well IDEs are able to include phase-specific build-flags.
Do you have any issues with these declarations? As far as I know,
requires static
should not affect dependent modules.There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
No issue that I'm aware of for now. I thought that those declarations are a risk, because the code could accidentally use those dependencies without warning from the compiler. The argument about being explicit can also be turned the other way around, i.e. they are not describing the reality if the code has no dependency to those modules. Anyway, this is not a major issue.