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
Problem: Specifying library versions?? #54
Comments
This is definitely something we're going to need to figure out. I don't have a great answer right now, but thank you for raising this concern. One of the things we want to achieve for sample code is ease of copy-paste. A possible solution I'd considered is a book-wide project.clj that includes all of the relevant dependencies. Does this sound reasonable, or is there a more favorable alternative? |
A book-wide project.clj worries me. I'm not sure how maintainable something like that would be for authors. I think a better alternative would be to use lein-sub, with applications ready for testing. Chapters would likely have libraries in common, but I wouldn't count on it. For completeness, each recipe could begin with == Problem Collect tweets and such. == Libraries twitter-api 0.7.8 == Solution (ns hello-twitter (:require [twitter-api :as twi])) or == Problem Collect tweets and such. == Solution (ns hello-twitter (:require [twitter-api :as twi])) ;; 0.7.8 |
Speaking with @levand it seems like per-recipe project.clj is the norm at the moment. We definitely should rig up As for messaging, you're right, there are a few alternatives. One proposal is to mention how to run code samples in the introduction and only call out specific versions in recipes where it is important (think the JLine issue from #40.) Reasonably styled it wouldn't be impossible to include a library and version number in such recipes printed format, though. What do you think is the most reasonable approach? |
A per recipe project.clj is compatible with the lein-sub way of doing things, so that is good news! I'm in favor of mentioning the library versions in the text since it will help users find recipes that are most current, and isn't actually that much of a hassle. |
I think we can include the library version and/or a brief reminder about the project.clj dependency cleanly. I'll make an issue to create instructions in CONTRIBUTING.md and a few examples. |
I'm going to close this card since we have an actionable decision in the form of #70. I'll be able to spend more time Friday ensuring a number of this repo Issues are corrected. |
A lot of problems can be practically solved by referring to third party libraries. The twitter api is an example of this.
We can specify versions within each recipe, but I wonder if we shouldn't just mention the library versions in the description and where people can grab the latest release.
Thoughts?
The text was updated successfully, but these errors were encountered: