Skip to content
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

Plugin picks up all files in the source/test folders #103

Open
lkonstantinov opened this issue Nov 8, 2016 · 0 comments
Open

Plugin picks up all files in the source/test folders #103

lkonstantinov opened this issue Nov 8, 2016 · 0 comments

Comments

@lkonstantinov
Copy link

I know the intention is to pick up only *.clj and *.cljc, but this code in NamespaceDiscovery.java:

    scanner.addSourceMapping(new SuffixMapping(".clj", new HashSet(Arrays.asList(".clj", "__init.class"))));
    scanner.addSourceMapping(new SuffixMapping(".cljc", new HashSet(Arrays.asList(".cljc", "__init.class"))));

only affects the StaleSourceScanner implementation. The SimpleSourceInclusionScanner needs to have the inclusion/exclusion collections initialized on construction - so, something like this:

  protected SourceInclusionScanner getSourceInclusionScanner(boolean includeStale) {
    return includeStale ? new SimpleSourceInclusionScanner(Sets.newHashSet("**/*.clj", "**/*.cljc"),
                                                           Collections.EMPTY_SET) : new StaleSourceScanner(1024);
  }

Without the fix the plugin is trying to compile any files it finds in the source directories (.cljs in my case) failing the whole build.

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

No branches or pull requests

1 participant