Skip to content

Allow to depend on simple F# or C# code files #9

Closed

Description

@forki

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.

Activity

  1. agross commented on Aug 31, 2014

    @agross
    Contributor

    Some people call these minimods. They use the normal nuget infrastructure but install source files and add them to the repo.

  2. isaacabraham commented on Aug 31, 2014

    @isaacabraham
    Contributor

    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?

  3. forki commented on Aug 31, 2014

    @forki
    MemberAuthor

    We would somehow still want to reference specific versions or version
    ranges.
    On Aug 31, 2014 4:31 PM, "Isaac Abraham" [email protected] wrote:

    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?

    —
    Reply to this email directly or view it on GitHub
    #9 (comment).

  4. agross commented on Aug 31, 2014

    @agross
    Contributor

    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.

  5. forki commented on Aug 31, 2014

    @forki
    MemberAuthor

    Yes. That's what we should implement. Any links?
    On Aug 31, 2014 4:43 PM, "Alexander Groß" [email protected] wrote:

    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.

    —
    Reply to this email directly or view it on GitHub
    #9 (comment).

  6. agross commented on Aug 31, 2014

    @agross
    Contributor

    Bundler docs ;-)

    It also support paths:
    gem 'foo', :path => '/somewhere'

    Git looks very similar.

  7. isaacabraham commented on Aug 31, 2014

    @isaacabraham
    Contributor

    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.

  8. forki commented on Aug 31, 2014

    @forki
    MemberAuthor

    Do we need a git implementation for this? Or is http download enough?

  9. isaacabraham commented on Aug 31, 2014

    @isaacabraham
    Contributor

    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?

  10. agross commented on Aug 31, 2014

    @agross
    Contributor

    Bundler requires git in path and just calls the executable.

  11. isaacabraham commented on Aug 31, 2014

    @isaacabraham
    Contributor

    @agross would you need to provide auth then?

  12. agross commented on Aug 31, 2014

    @agross
    Contributor

    @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).

  13. forki commented on Aug 31, 2014

    @forki
    MemberAuthor

    git in path is OK for me. We do the same in FAKE.
    On Aug 31, 2014 6:16 PM, "Alexander Groß" [email protected] wrote:

    @isaacabraham https://github.com/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).

    —
    Reply to this email directly or view it on GitHub
    #9 (comment).

  14. changed the title [-]Allow to depend on simple F# code files[/-] [+]Allow to depend on simple F# or C# code files[/+] on Sep 2, 2014
  15. 12 remaining items

  16. ilkerde commented on Sep 11, 2014

    @ilkerde

    +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).

  17. bartelink commented on Sep 11, 2014

    @bartelink
    Member

    @forki @isaacabraham I dont disagree but

    1. I think its it's important that the potential impl approach of generating faux packages to not force any downstream complexity/unecessary bifurcation of code paths be considerd
    2. I think its important that to keep this feature minimal, one should consider that there's a point where source packages are the right tool for the job

    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

  18. bartelink commented on Sep 11, 2014

    @bartelink
    Member

    @ilkerde maybe on the local file system / unc path too ?

    (Maybe impl can share a general location specification with package sources to some degree?)

  19. ilkerde commented on Sep 11, 2014

    @ilkerde

    @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.

  20. isaacabraham commented on Sep 11, 2014

    @isaacabraham
    Contributor

    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.

  21. bartelink commented on Sep 11, 2014

    @bartelink
    Member

    @ilkerde Fair enough, makes sense.

    On reflection, while source needs to deal with a http or a local or a unc path, what it then in turn does is pretty different to what this needs to do.

    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.

  22. forki commented on Sep 11, 2014

    @forki
    MemberAuthor

    Yes depending on a single F# file would be a good start and actually help
    the F# community a lot. That's for sure
    On Sep 11, 2014 10:22 PM, "bartelink" [email protected] wrote:

    @ilkerde https://github.com/ilkerde Fair enough, makes sense.

    On reflection, while source needs to deal with a http or a local or a unc
    path, what it then in turn does is pretty different to what this needs to
    do.

    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.

    —
    Reply to this email directly or view it on GitHub
    #9 (comment).

  23. agross commented on Sep 11, 2014

    @agross
    Contributor

    Just for your reference regarding source: bundler does not use source when pulling from git. It rather uses some parameters to the gemmethod, probably adding them to an internal list of sources (haven't checked).

    gem 'nokogiri', :git => 'https://github.com/tenderlove/nokogiri.git'
    gem 'rails', :git => 'https://github.com/rails/rails.git', :ref => '4aded'
    gem 'rails', :git => 'https://github.com/rails/rails.git', :branch => '2-3-stable'
    gem 'rails', :git => 'https://github.com/rails/rails.git', :tag => 'v2.3.5'
    

    There are also some nice built-in git sources for GitHub, Gist and Bitbucket:

    gem 'rails', :github => 'rails'
    

    And you can define new ones as well:

    git_source(:stash){ |repo_name| "https://stash.corp.acme.pl/#{repo_name}.git" }
    gem 'rails', :stash => 'forks/rails'
    

    http://bundler.io/git.html

  24. isaacabraham commented on Sep 11, 2014

    @isaacabraham
    Contributor

    @forki before I go any further could you review https://github.com/isaacabraham/Paket/tree/github-files?

    • I've modified the dependencies file format to allow capturing single files as dependencies.
    • There's no change to the lockfile because there's no indirect dependencies on a source file (I'm not parsing the file to see what other files are required!).
    • The files are downloaded and copied into a path underneath the location of the dependencies file.

    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.

  25. forki commented on Sep 12, 2014

    @forki
    MemberAuthor

    I can't see any diff. Can you please create a pull request and mark it as
    WIP? Thanks.

    Btw: I think we have to add it also to the lockfile since this is the only
    thing we read during a normal install.
    On Sep 12, 2014 12:37 AM, "Isaac Abraham" [email protected] wrote:

    @forki https://github.com/forki before I go any further could you
    review https://github.com/isaacabraham/Paket/tree/github-files?

    • I've modified the dependencies file format to allow capturing single
      files as dependencies.
    • There's no change to the lockfile because there's no indirect
      dependencies on a source file (I'm not parsing the file to see what other
      files are required!).
    • The files are downloaded and copied into a path underneath the
      location of the dependencies file.

    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.

    —
    Reply to this email directly or view it on GitHub
    #9 (comment).

  26. isaacabraham commented on Sep 12, 2014

    @isaacabraham
    Contributor

    K will do.


    From: Steffen Forkmannmailto:[email protected]
    Sent: ‎12/‎09/‎2014 07:19
    To: fsprojects/Paketmailto:[email protected]
    Cc: Isaac Abrahammailto:[email protected]
    Subject: Re: [Paket] Allow to depend on simple F# or C# code files (#9)

    I can't see any diff. Can you please create a pull request and mark it as
    WIP? Thanks.

    Btw: I think we have to add it also to the lockfile since this is the only
    thing we read during a normal install.
    On Sep 12, 2014 12:37 AM, "Isaac Abraham" [email protected] wrote:

    @forki https://github.com/forki before I go any further could you
    review https://github.com/isaacabraham/Paket/tree/github-files?

    • I've modified the dependencies file format to allow capturing single
      files as dependencies.
    • There's no change to the lockfile because there's no indirect
      dependencies on a source file (I'm not parsing the file to see what other
      files are required!).
    • The files are downloaded and copied into a path underneath the
      location of the dependencies file.

    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.

    —
    Reply to this email directly or view it on GitHub
    #9 (comment).


    Reply to this email directly or view it on GitHub:
    #9 (comment)

  27. isaacabraham commented on Sep 12, 2014

    @isaacabraham
    Contributor
  28. isaacabraham commented on Sep 16, 2014

    @isaacabraham
    Contributor

    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.

  29. forki commented on Sep 16, 2014

    @forki
    MemberAuthor

    yes I'm currently dogfooding this and will open new issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions