Skip to content

Commit

Permalink
Reuse ExecutionContext with onError for Omniparser (#368)
Browse files Browse the repository at this point in the history
To avoid swallowing throwables from parsers
  • Loading branch information
timtebeek authored Feb 6, 2025
1 parent b59913e commit dcfbaf9
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -172,7 +172,7 @@ SourceFileStream parseProjectSourceSets(Project project,
.collect(Collectors.toSet());
sourceSetSourceFiles = Stream.concat(
sourceSetSourceFiles,
omniParser.parse(accepted, baseDir, new InMemoryExecutionContext())
omniParser.parse(accepted, baseDir, ctx)
.map(it -> it.withMarkers(it.getMarkers().add(javaVersion))));
alreadyParsed.addAll(accepted);
sourceSetSize += accepted.size();
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -881,7 +881,7 @@ private SourceFileStream parseGradleProjectSourceSets(Project subproject,
List<Path> accepted = omniParser.acceptedPaths(baseDir, resourcesDir.toPath());
sourceSetSourceFiles = Stream.concat(
sourceSetSourceFiles,
omniParser.parse(accepted, baseDir, new InMemoryExecutionContext())
omniParser.parse(accepted, baseDir, ctx)
.map(it -> it.withMarkers(it.getMarkers().add(javaVersion))));
alreadyParsed.addAll(accepted);
sourceSetSize += accepted.size();
Expand Down

0 comments on commit dcfbaf9

Please sign in to comment.