Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP

Loading…

Use relative paths for exclusion matching in weaver. #34

Open
wants to merge 1 commit into from

2 participants

@Feuermurmel

Hi, I've run into a problem while building kilim from source. The weaver would not process any of the classes after they have been compiled, specifically this line in build.sh didn't work:

java -ea kilim.tools.Weaver -d ./classes -x "ExInvalid|test" ./classes

It turns out that the problem was that the regular expression of the exclusion filter was matched agains the absolute path of each .class file. And because I checked out the repository into a folder called kilim-test, all files would be excluded by the filter.

I've fixed it by modifying DirIterator.getFileName() so that the paths it returns are no longer absolute but relative to the directory specified on the command line.

@Feuermurmel Feuermurmel Use relative paths for exclusion matching in weaver.
Modified DirIterator to return paths relative to the start directory, like JarIterator. This prevents exclusions specified using -x to match agains path components outside the build output directory.
4a36045
@kilim
Owner
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Commits on Feb 1, 2014
  1. @Feuermurmel

    Use relative paths for exclusion matching in weaver.

    Feuermurmel authored
    Modified DirIterator to return paths relative to the start directory, like JarIterator. This prevents exclusions specified using -x to match agains path components outside the build output directory.
This page is out of date. Refresh to see the latest.
Showing with 1 addition and 4 deletions.
  1. +1 −4 src/kilim/analysis/FileLister.java
View
5 src/kilim/analysis/FileLister.java
@@ -104,10 +104,7 @@ public long getSize() {
}
@Override
public String getFileName() {
- try {
- return file.getCanonicalPath();
- } catch (IOException ignore) {}
- return null;
+ return file.getPath();
}
@Override
Something went wrong with that request. Please try again.