-
Notifications
You must be signed in to change notification settings - Fork 519
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 to depend on simple F# or C# code files #9
Comments
Some people call these minimods. They use the normal nuget infrastructure but install source files and add them to the repo. |
I would prefer to see a more lightweight mechanism - if it's just a couple of files on e.g. github, why not just reference them directly in the paket configuration file? |
We would somehow still want to reference specific versions or version
|
Actually, bundler has something like that. You can specify a git source for a gem and even tell it to track master or a specific git commit. |
Yes. That's what we should implement. Any links?
|
Bundler docs ;-) It also support paths: Git looks very similar. |
Only thing that I'm not clear is that bundler still looks for a .gemspec file in the repo. I would also like to see the ability to simply reference particular files (or folders) against a particular git commit etc. |
Do we need a git implementation for this? Or is http download enough? |
Bundler talks about avoiding http re: man in middle. But I'm of the opinion to start simple, just use http to start with - can always move to something else if needed? |
Bundler requires git in path and just calls the executable. |
@agross would you need to provide auth then? |
@isaacabraham I never used bundler with authenticated git repos. I think the git defaults would work if you have the keypairs for SSH access available. It seem's there's a solution for authenticated HTTP repos as well: https://gist.github.com/masonforest/4048732 Other than that, you can still embed username and password in the HTTP URL (if you use Gitlab, for example). |
git in path is OK for me. We do the same in FAKE.
|
I second this proposal and would love to see this feature. As for the source, I think git (and using it with git in path as prereq) is fair enough. AFAIK bundler, bower and composer do all the same. One nicety to note here actually is the support of semver-style git tags (as bower does, see docs). |
who wants to work on this? |
I’d be happy to have a crack at this but might not be able to start for a couple of days. Given that I’m not as intimately familiar with the entire Paket codebase, maybe a good way would be for me to just do something decoupled like the code that can retrieve the source files from git e.g. (repo:string, filePath:string) -> seq<async> or something like that? From: Steffen Forkmann [mailto:notifications@github.com] who wants to work on this? — |
sounds good. As already discussed you can assume that git is in the path if you need it. Also take a look at https://github.com/fsharp/FAKE/tree/master/src/app/FakeLib/Git and copy functions over if you need. |
I'd have a look at NuGet source code packages; here's a good writeup. A Having said all that, I'd love to abuse the scheme envisaged above too. But I'd feel very dirty if I did :( |
Very cool, but please create a separate issue so that we can keep track of
|
@forki Not sure what you mean. Paket doesn't need to do anything new (and the post I cite is conventions for authors which tie things up nicely but ultimately don't affect consumption). #65 deals with installing source packages - specifically expanding ... can you explain what you'd like an issue for? happy to do it once that's clear :) (Logged some notes on #65 about stuff around this) |
Confused. What we're aiming for I thought is a lightweight binding to individual (or paths) of files in github. What's the relationship between that and nuget packages? |
@isaacabraham @forki Still awaiting clarification from Steffen; My last comment was a reaction to "please create a separate issue so that we can keep track of As I see it:
Therefore, in designing this feature its important to consider overlaps with source packages
|
The point of dependencies on source code is that there's no requirement for the owner of the code to make a source package. Anyone can be dependent on any code in github - the versioning can be achieve based on a git commit tag. As @forki says - this sounds like a separate feature to what we've been proposing here. |
I see two different features:
|
+1 @forki One thing to note for this issue: We should enable having a dependency on any file, even those with no metadata (i.e. no git tag). |
@forki @isaacabraham I dont disagree but
Based on the above all I'm saying is that an impl and design of this feature should not be blinkered to the presence of source packages |
@ilkerde maybe on the local file system / unc path too ? (Maybe impl can share a general location specification with package sources to some degree?) |
@bartelink I think it's enough for the time being just to have one concrete impl (in this case sth. like fetching a file from a github repo). Taking additional sources into consideration feels like premature generalization to me. |
I had a quick play with the GitHub website (not the rate-limited GitHub API), and it's easy enough just to download a single file - not a folder - with a straight HTTP GET. You can specify any commit, branch or tag in the URI. If this is enough to start with then I'll go ahead and do it. |
@ilkerde Fair enough, makes sense. On reflection, while The main point I'd make is that, at the point where this would support other sources, where possible the syntax for specifiyng them should be shared insofar as that principle makes sense. |
Yes depending on a single F# file would be a good start and actually help
|
Just for your reference regarding
There are also some nice built-in git sources for GitHub, Gist and Bitbucket:
And you can define new ones as well:
|
@forki before I go any further could you review https://github.com/isaacabraham/Paket/tree/github-files?
I still have to do the .proj modification stuff as well as removing dependencies - but first just make sure you're happy with how it looks so far. I've modified the sample dependency file in the C# test project to illustrate how it works. |
I can't see any diff. Can you please create a pull request and mark it as Btw: I think we have to add it also to the lockfile since this is the only
|
K will do. From: Steffen Forkmannmailto:notifications@github.com I can't see any diff. Can you please create a pull request and mark it as Btw: I think we have to add it also to the lockfile since this is the only
Reply to this email directly or view it on GitHub: |
Here's the changes BTW for the moment (without the lockfile stuff): |
So currently we can import single files from GitHub into projects. Is anyone looking at taking this forward - I think we need to still look at removal of files (probably a Packet=true tag will be needed on individual files) as well as how files interoperate with the references file / individual projects. |
yes I'm currently dogfooding this and will open new issues. |
In F# land we often want to share one or two F# files between multiple repositories. It would be cool to have support for that.
Not sure if nuget is the best way for that.
The text was updated successfully, but these errors were encountered: