Skip to content

Introduce Jimfs to host files during testing #37

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

Open
wants to merge 5 commits into
base: main
Choose a base branch
from

Conversation

davidburstromspotify
Copy link
Contributor

This proves that the processor is independent of the default filesystem.

Introducing Jimfs to the RuleProcessorTest, the RuleProcessor
runs successfully without referencing the default filesystem.

The only required fix was to ensure the SinglePathFilter
resolves files based on the target Path underlying filesystem
instead of the default one.
Especially when using a virtual file system like Jimfs,
the '/' directory is a feasible root for analysis, but it
has no filename component.
If building the project in e.g. x:/ Gradle cannot work out
the intended root project name based on the directory.
@davidburstromspotify
Copy link
Contributor Author

@mattmook Hi Matt! Let me know if you'd like me to address anything.

@davidburstromspotify
Copy link
Contributor Author

@mattmook The Windows issue seems to happen even on current main:HEAD, independently of my PR.

It leads to intermittent build failures, both locally
and in CI.
@davidburstromspotify
Copy link
Contributor Author

After some debugging it looks as it's the JaCoCo agent that gets applied through MarkdownLintPluginTest that keeps a process alive a little too long, since this is timing related. Removing it makes the tests pass 100%. I'd suggest it is not enabled on Windows builds.

@davidburstromspotify
Copy link
Contributor Author

Hi @mattmook! Do you think this could be merged?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant