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

Allow leiningen.compile/compile to take non-string arguments #1442

hypirion opened this Issue Feb 8, 2014 · 2 comments


None yet
2 participants
Copy link

commented Feb 8, 2014

As it stands, compile (wrongly?) assumes that all input arguments are strings. This makes it harder to use it from plugins and inside e.g. :prep-tasks. As an example of a wishful realistic setup

:prep-task [["compile" #"regex-for-files-java-code-depends-upon"]
             "javac" "compile"]

However, the regex must be string-quoted to make this work:

:prep-task [["compile" "#\"regex-for-files-java-code-depends-upon\""]
             "javac" "compile"]

This can quickly get messy if you use backslash-quoting in the regex, because the regex reader rules doesn't apply anymore. Additionally, the keyword :all would be nice to have unquoted as well.


This comment has been minimized.

Copy link

commented Feb 11, 2014

Accepting args that have already passed through the reader sounds good to me, but if we do this we shouldn't limit it to just the compile task; it might be applicable elsewhere too.


This comment has been minimized.

Copy link
Collaborator Author

commented Feb 14, 2014

@technomancy Yeah, that should be a goal. I don't think I've seen any other task in core not working like that for some time though.

In this specific case, compile thinks all input arguments are strings (from the command lin), and tries to convert strings starting with # to a regex.

@hypirion hypirion closed this in a5d2ea5 Feb 22, 2014

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.