Skip to content

Commit afe3aad

Browse files
authored
Merge branch 'master' into cfg-extend-once
2 parents 972d398 + 33b8815 commit afe3aad

File tree

5 files changed

+57
-10
lines changed

5 files changed

+57
-10
lines changed

.coderabbit.yaml

Lines changed: 29 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,29 @@
1+
# yaml-language-server: $schema=https://coderabbit.ai/integrations/schema.v2.json
2+
3+
language: "en-US"
4+
5+
reviews:
6+
profile: "assertive"
7+
high_level_summary: true
8+
collapse_walkthrough: true
9+
poem: false
10+
review_status: false
11+
path_filters:
12+
- "!**/build/**"
13+
- "!**/out/**"
14+
- "!**/.gradle/**"
15+
- "!**/.idea/**"
16+
- "!**/node_modules/**"
17+
ignore_title_keywords:
18+
- "wip"
19+
- "draft"
20+
21+
chat:
22+
art: false
23+
24+
knowledge_base:
25+
code_guidelines:
26+
enabled: true
27+
filePatterns:
28+
- "**/.cursorrules"
29+
- "**/CODING_STANDARDS.md"

docs/developer/new-contributor-projects.html

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1899,7 +1899,7 @@ <h1 id="apply">How to apply to GSoC (relevant to GSoC students only)</h1>
18991899
-->
19001900
<!-- LocalWords: unrefinement JavaParserUtil parseExpression StubParser
19011901
-->
1902-
<!-- LocalWords: expressionWithParameterNames currentSourceVersion
1902+
<!-- LocalWords: expressionWithParameterNames currentSourceVersion '
19031903
-->
19041904
<!-- LocalWords: AnnotationFileParser EnsuresCalledMethods CalledMethods
19051905
-->

docs/developer/release/.flake8

Lines changed: 0 additions & 4 deletions
This file was deleted.

docs/developer/release/README-release-process.html

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -448,7 +448,7 @@ <h3 id="file_layout">File Layout</h3>
448448
in interm are clones of the GitHub repositories. This is so that
449449
we can test and push the release to the interm repositories then check the
450450
release before we have made any irreversible changes. Then, when the release
451-
is validated, all we do is run &quot;git push&quot; on all of the repos in interm.
451+
is validated, all we do is run &quot;git push&quot; on all of the repositories in interm.
452452
</td>
453453
</tr>
454454
<tr>
@@ -738,7 +738,7 @@ <h4>Tasks:</h4> <!-- omit from toc -->
738738
</body>
739739
</html>
740740

741-
<!-- LocalWords: serif px pre CCC JDK AFS PAG mkdir cd svn co EFEFEF ul li Changelog stubparser JavaParser GenericAnnotatedTypeFactory CFTransfer CFAbstractTransfer CFAbstractAnalysis CFAnalysis CFAbstractStore CFStore CFAbstractValue CFValue BaseTypeVisitor BaseTypeChecker SourceChecker MultigraphQualifierHierarchy AbstractQualifierPolymorphism AnnotationUtils TreeAnnotator TODO typetools
741+
<!-- LocalWords: serif px pre CCC JDK AFS PAG mkdir cd svn co EFEFEF ul li Changelog stubparser JavaParser GenericAnnotatedTypeFactory CFTransfer CFAbstractTransfer CFAbstractAnalysis CFAnalysis CFAbstractStore CFStore CFAbstractValue CFValue BaseTypeVisitor BaseTypeChecker SourceChecker MultigraphQualifierHierarchy AbstractQualifierPolymorphism AnnotationUtils TreeAnnotator TODO typetools SDK BOM includeGroup 'org checkerFrameworkVersion compileOnly testCompileOnly checkerFramework resolutionStrategy cacheChangingModulesFor tokenuser tokenkey
742742
-->
743743
<!-- LocalWords: xml ver dev yyyyMMDD URL url diff buildfile kelloggm checkerframework gradle
744744
-->

javacutil/src/main/java/org/checkerframework/javacutil/javacparse/JavacParse.java

Lines changed: 25 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@
2020
import javax.tools.DiagnosticCollector;
2121
import javax.tools.DiagnosticListener;
2222
import javax.tools.JavaFileObject;
23+
import org.checkerframework.javacutil.UserError;
2324

2425
/**
2526
* This class contains static methods that parse Java code.
@@ -210,7 +211,14 @@ public static JavacParseResult<CompilationUnitTree> parseCompilationUnit(JavaFil
210211
new JavacFileManager(context, true, StandardCharsets.UTF_8)) {
211212

212213
Log.instance(context).useSource(source);
213-
ParserFactory parserFactory = ParserFactory.instance(context);
214+
ParserFactory parserFactory;
215+
try {
216+
parserFactory = ParserFactory.instance(context);
217+
} catch (IllegalAccessError e) {
218+
throw new UserError(
219+
"Provide `--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED` along with"
220+
+ " any other `--add-exports` in the Checker Framework invocation.");
221+
}
214222
JavacParser parser = parserFactory.newParser(source.getCharContent(false), true, true, true);
215223
CompilationUnitTree cu = parser.parseCompilationUnit();
216224
((JCCompilationUnit) cu).sourcefile = source;
@@ -244,7 +252,14 @@ public static JavacParseResult<ExpressionTree> parseExpression(JavaFileObject so
244252
new JavacFileManager(context, true, StandardCharsets.UTF_8)) {
245253

246254
Log.instance(context).useSource(source);
247-
ParserFactory parserFactory = ParserFactory.instance(context);
255+
ParserFactory parserFactory;
256+
try {
257+
parserFactory = ParserFactory.instance(context);
258+
} catch (IllegalAccessError e) {
259+
throw new UserError(
260+
"Provide `--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED` along with"
261+
+ " any other `--add-exports` in the Checker Framework invocation.");
262+
}
248263
JavacParser parser = parserFactory.newParser(source.getCharContent(false), true, true, true);
249264
ExpressionTree eTree = parser.parseExpression();
250265
return new JavacParseResult<ExpressionTree>(eTree, diagnostics.getDiagnostics());
@@ -270,7 +285,14 @@ public static JavacParseResult<ExpressionTree> parseTypeUse(JavaFileObject sourc
270285
new JavacFileManager(context, true, StandardCharsets.UTF_8)) {
271286

272287
Log.instance(context).useSource(source);
273-
ParserFactory parserFactory = ParserFactory.instance(context);
288+
ParserFactory parserFactory;
289+
try {
290+
parserFactory = ParserFactory.instance(context);
291+
} catch (IllegalAccessError e) {
292+
throw new UserError(
293+
"Provide `--add-exports=jdk.compiler/com.sun.tools.javac.parser=ALL-UNNAMED` along with"
294+
+ " any other `--add-exports` in the Checker Framework invocation.");
295+
}
274296
JavacParser parser = parserFactory.newParser(source.getCharContent(false), true, true, true);
275297
ExpressionTree eTree = parser.parseType();
276298
return new JavacParseResult<ExpressionTree>(eTree, diagnostics.getDiagnostics());

0 commit comments

Comments
 (0)