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

Evaluate leiningen's project.clj files #5

Open
darwin opened this issue Nov 13, 2017 · 1 comment
Open

Evaluate leiningen's project.clj files #5

darwin opened this issue Nov 13, 2017 · 1 comment

Comments

@darwin
Copy link

darwin commented Nov 13, 2017

Cool project but unfortunately I cannot really use it with my lein project files.

You read project.clj files as data, but in general case they contain arbitrary code. For example I might want to "compute" dependency versions using some code:
https://github.com/binaryage/dirac/blob/master/project.clj#L1

Ideally you should run leiningen to evaluate dependencies and parse the results:
lein pprint :dependencies

or in more general case:
lein with-profiles <some-profiles> pprint :dependencies
and let me specify some-profiles as part of badge url.

But I understand that this is kinda edge case and running arbitrary foreign code in the context a web service might be too dangerous.

@darwin darwin changed the title In general case project.clj is code, not just static data Evaluate leiningen's project.clj files Nov 13, 2017
@danielcompton
Copy link
Member

Yeah, it is a little bit dangerous running arbitrary code. I've thought about using disposable Lambda's or the like for being able to more safely read the projects, but at the moment it's all just in a single process. This is even more of an issue for Boot projects, as they tend to be even more programmatic.

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

2 participants