google / google/compile-testing

Access to Filer, assert about generated files

Open
#58 3 comments 0 reactions 0 assignees View on GitHub
P3
Dominant language
Java
Stars
722
Forks
129
Avg merge
11m
Merged PRs (30d)
4

Description

Access to the `Filer` is trivial to add to `CompilationRule`. What I can't figure out is how to propagate the generated content back to the test to assert on the generated sources. At the very least it would require a change to `Compilation` to inject the `InMemoryJavaFileManager` so it could also be made available to the test but that brings other dependencies with it. Perhaps `Compilation` should be more stateful than just static helpers?

I'm not doing any actual compilation. I want to only test interactions with a `Filer` and assert on its outputs.

Happy to implement, just want guidance/approval on the approach.

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.