Use relative paths for exclusion matching in weaver. #34

Closed
wants to merge 1 commit into
from

Conversation

Projects
None yet
3 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.

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.
@kilim

This comment has been minimized.

Show comment Hide comment
@kilim

kilim Feb 1, 2014

Owner

Ah, thank you!

Owner

kilim commented Feb 1, 2014

Ah, thank you!

@nqzero nqzero referenced this pull request in nqzero/kilim Jan 31, 2018

Merged

Use relative paths for exclusion matching in weaver. #4

@nqzero

This comment has been minimized.

Show comment Hide comment
@nqzero

nqzero Jan 31, 2018

Collaborator

this has been merged into kilim 2.0 by this commit

via nqzero#4

and i'm closing this PR

Collaborator

nqzero commented Jan 31, 2018

this has been merged into kilim 2.0 by this commit

via nqzero#4

and i'm closing this PR

@nqzero nqzero closed this Jan 31, 2018

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment