-
Notifications
You must be signed in to change notification settings - Fork 229
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
Add path: source strategy to pub, pull packages from location on disk #54
Comments
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent We do plan to have a file path source, but you won't need that for SDK packages since they already have their own source. Added this to the Later milestone. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Removed this from the Later milestone. |
<img src="https://avatars.githubusercontent.com/u/2590778?v=3" align="left" width="48" height="48"hspace="10"> Comment by RWander This feature is very useful. Please add support of 'path'.. |
<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo Perhaps to double-down on the obvious. If I'm developing two packages at the same time on local disk, I can use git with local path syntax, but then I have to constantly commit on one and re-run 'pub update' on the other. Being able to reference a local path and have the symbolic link point to my working 'lib' dir would rock. |
<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="48" height="48"hspace="10"> Comment by sethladd Hi Nathan and Bob, Would you take a patch for this? Is this functionality that you'd like to see in pub? cc @nex3. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent Yes, this is definitely a planned feature (and, last I checked, the most starred pub bug). Patches are welcome! |
<img src="https://avatars.githubusercontent.com/u/785058?v=3" align="left" width="48" height="48"hspace="10"> Comment by simonpai Linking some related discussion, just FYI: |
<img src="https://avatars.githubusercontent.com/u/188?v=3" align="left" width="48" height="48"hspace="10"> Comment by nex3 Marked this as blocking #344. |
<img src="https://avatars.githubusercontent.com/u/154468?v=3" align="left" width="48" height="48"hspace="10"> Comment by selkhateeb I'm not convinced this is the right way to go as it makes it hard to share code with other developers, everyone must have his own pubspec.yaml file that points to some paths in his system. I would propose having a 'development' version string, similar to the 'any' version concept. When 'pub install' encounters a 'development' version it would look for a global config file somewhere in the home directory named 'pubconfig.yaml'. The 'pubconfig.yaml' file would contain the path source that is needed by pub to install the dependancy. Example: dependencies: ~/pubconfig.yaml: pub install |
<img src="https://avatars.githubusercontent.com/u/17034?v=3" align="left" width="48" height="48"hspace="10"> Comment by kevmoo Ooo...that's kinda nice. Then I have a lot of projects on my machine that depend on each other. Being able to register the 'dev' location for project X and refer to it w/ one change in other projects is pretty clean. |
<img src="https://avatars.githubusercontent.com/u/1081711?v=3" align="left" width="48" height="48"hspace="10"> Comment by jmesserly +1 for some way to set up development dependencies! |
<img src="https://avatars.githubusercontent.com/u/154468?v=3" align="left" width="48" height="48"hspace="10"> Comment by selkhateeb If anybody is interested, here is a patch that implements the path source idea. This patch can be applied to this latest stable trunk. I used this for the past few days and concluded that its not the best way to be used for larger teams as in Comment 9 Give it a try and let me know what ideas you might come up with Thanks Attachment: |
This comment was originally written by [email protected] +1 for the 'development' dependency idea ('dev' might be simpler and less prone to typos) and separating the local paths into a separate mechanism. |
This comment was originally written by [email protected] 'development' dependency idea looks very promising to me too. |
<img src="https://avatars.githubusercontent.com/u/46275?v=3" align="left" width="48" height="48"hspace="10"> Comment by munificent We're planning to do dev dependencies at some point. Here's the relevant bug to follow: http://code.google.com/p/dart/issues/detail?id=5358 same@, I have similar thoughts about path: dependencies. I'll see if I can sit down with Nathan soon and work out what we want to do here. I would definitely like to address this relatively soon. |
<img src="https://avatars.githubusercontent.com/u/154468?v=3" align="left" width="48" height="48"hspace="10"> Comment by selkhateeb I think issue dart-lang/sdk#8 has a different purpose than what we have here. Issue dart-lang/sdk#8 talks about dependencies that are needed for developing the project, like unittest. Which we don't care about in production. This issue talks about a development "version" of a production dependency. I have implemented a working prototype of whats in comment #9. Let me know if you want me to share the code here and take it for a spin Thanks |
<img src="https://avatars.githubusercontent.com/u/480590?v=3" align="left" width="48" height="48"hspace="10"> Comment by Ladicek So here's an idea I had and wanted to explore, but didn't (yet) due to lack of time. Pub could spawn a local server that would act as a repository (i.e., it would speak the pub.dartlang.org protocol) serving a set of defined packages from local filesystem and acting as a proxy to pub.dartlang.org for other packages. Then, pub install/update (when ran in special mode) would use this local server instead of pub.dartlang.org. The main advantage is that pubspec itself wouldn't necessarily have to be aware of this "development mode", which I'd consider a good thing. |
<img src="https://avatars.githubusercontent.com/u/785058?v=3" align="left" width="48" height="48"hspace="10"> Comment by simonpai +1 for having a local server. As you will not want to commit the path dependency setting in your pubspec to the remote, it is much better if pub can resolve this issue transparently, independently from your code base. Otherwise you will have the leave untracked changes all the way during your development, in every project on the dependency chain, which is very very annoying. |
This comment was originally written by [email protected] Very annoying, please add a workaround (e.g. path: ...)! |
<img src="https://avatars.githubusercontent.com/u/5479?v=3" align="left" width="96" height="96"hspace="10"> Issue by sethladd
Originally opened as dart-lang/sdk#3732
Not all packages come from git, some come from a location on disk (like the SDK). Add a path: source strategy to find and use them.
e.g.
dependencies:
unittest:
path: /absolute/path/to/sdk/lib
The text was updated successfully, but these errors were encountered: