-
Notifications
You must be signed in to change notification settings - Fork 526
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
Make "Get package" available in REPL #124
Comments
We were talking about enabling this natively in FSI. Perhaps something like:
How do you see this integrating with Paket? |
Yes that would be the best solution, but that's really far away since it But I'm more talking about a solution which could be enabled today.
|
Yeah I agree, it might take a while. Providing an easy API from Paket is a great idea as a first step. Currently Paket is distributed as a single executable right? A simple approach might be: #r "Paket.exe"
Paket.Fetch "FSharp.Data"
#r "<paket dir>/FSharp.Data.dll" or similar, where Paket would just place all the fetched dlls in a particular directory. It's a shame that |
Any tab-completion-for-files story for |
Tab completion for the filesystem would be simple to add to FCS, but then needs to be exposed in every editor. If |
Fair point. I was missing a
|
No sadly you can only pass it a literal string. Another option is for paket to have a command so that running An editor can then easily be configured to use an alternative fsi, which in this case would be paket itself. |
I got that its only a literal but was working on the basis that such an impediment could easily be overcome using the Art of the Possible / SEP fields :) @rneatherway Interesting idea. In principle the dependencies file is not important - it can have mutually exclusive packages and/or very broadly scoped packages. Which leaves
Bottom line: Paket could extract a
Side things are:
Bottom line is in a sln/proj case, the fsproj always has authoritative info so the info as a whole might as well be sourced there and as long as the DLLs are not being locked, paket can update v easily. I personally would love to have a magic button to load/reload up my project in a FSI because having to copy refs to clipboard etc. makes it so much harder to Just Do. Paket can then simply grow a "paket add" of some kiind which triggers download/install and a relevant reload as per above. All of this is thinking aloud from someone that doesnt use FSI enough. @ptrelford Any ideas/dreams ? You tried Paket yet? |
OK sorry! In that case it's a neat suggestion, but if we assume we can modify FSI, I would go the whole hog and add nuget/project support directly. To answer some of your points/questions:
|
@rneatherway Apologies for not replying earlier. I was hammocking #154 and #166 Firstly re
I dont think anyone wants anything in Paket per se - people just want stuff to work. Paket is happy to helper and its nice is stuff is composable but it def doesn't 'want'/need it ? i.e. I dont know what you mean but assume you mean nothing! It seems to me that the "magic import" #124 (comment) : would mesh well with #154 if it can project out packages (see also my monolog 'with' @jeffhandley in https://jabbr.net/#/rooms/fsharp today) The problem with
or
Is
#154 and projecting as
So, circling back around, it seems to me that something in Paket like:
could generate something like
And then one could use that in commnandline fsi via cut and paste:
And with a bit of work, if fsxs supported a
OR
where
Thoughts? |
If this feature works directly from the
I'm discounting all features that require modification to FSI. The turnaround time and upgrade delay would leave this feature unreliable for years to come. I also am not a fan of VS-specific solutions. I usually use Emacs, and I think Paket could be a great way to continue to improve the .NET development experience on Unix. That said, I think emitting an fsx with the reference closure and optionally launching fsi including that fsx is a good option. I have an MSBuild task here that actually constructs such an fsx as part of the build. I also have code in the Emacs support for F# that could be used to do the same thing. |
Ah, I was thinking of tool as a standalone exe / DLL. In the case of emitting to the fsproj, I'd picture the things picking it up being the e.g. VFPT which I don't see as fitting the term "tool" - I call that "integrated into one or more plugins and/or the project system". (Not arguing, just explaining why the comment didnt initially make sense to me) AIUI #166 would deal with the files being present in the file system and in the project
I appreciate that. I'm effectively in the same camp despite on the surface being in a different world. I like and use VS but I like having a proper build too and I cant imagine using any variant of the NuGet tooling in VS again - i.e. Package Manager Console and its stuff makes no sense. The view I take is that the more general/composable something like this is, the wackier a bot @mathias-brandewinder and his like can write .
Then perhaps... is there/should we request a If you had that, then you could tell Then In the meantime and/or for generalized builds you can have a task or a script that will CPP-stlye preprocess fsx files if it's not there yet. i.e. Just because everyone can't use it now shouldnt rule out considering it as part of the solution. Another thing to consider in all this is that a package can have nested dependencies - e.g. if you want to stand up an in memory owin host, the unit of what you want loaded into your fsx context might be 15 |
You can use I would like to see a native solution in FSI for other purposes as well, but my opinion is that it is best to keep these proposals separate. |
BTW Since this thread started, we've gained OK so.... what do we do with this issue to bring it to a close? Seems to me that if someone who has done fsx scripting formulated an appropriate proposal, i.e. what subsets of stuff would you want - individual DLLs ? Source files? Both? Separable? then Paket could generate a set of e.g. then scripts can #load them (so you're confirming but for multi-framework packages @forki @agross @ilkerde @isaacabraham @tpetricek @ptrelford @ovatsus I'm out of names to pull in off the top of my head but I think there's enough food for thought in this thread for someone to pull out something useful for VFPT, FSI, Paket or something else to start doing which others can then use and/or build on |
Yes, I do this regularly.
Not currently. I would imagine that Paket would generate the references according to the current configuration, which could optionally be overridden. This could be done manually with say |
I can put together a PR for this if it sounds acceptable to someone with commit access. |
what would you do exactly? |
I suggest the following, which does not require modification of FSI: Add a new command If this works well, the generation could be made automatic -- to be run when |
it sounds good. 2014-09-29 16:56 GMT+02:00 Robin Neatherway [email protected]:
|
@rneatherway Sounds cool. One thing though is that I don't get is
Are you suggesting to process the xml and determine the prop value and use that as input to the process? If so, that How would a non-default gen become a persistent synced thing I wonder? Perhaps the (#154 There you go again @forki) Looking forward to this. I dont use the REPL half enough. And then I'll be atting-in @ptrelford after the impl is done to see if he'd use it to walk the code to generate test function reload lists etc. as part of a smooth testing experience etc. (IOW are there other such 'standard' fsx snippets anyone can think of?) |
I have a strategy for this and hope to submit the PR soon. Just ironing out a few bugs in the project-walking code. @bartelink I am going to process the project files using the MSBuild API. The current configuration is provided by the solution file, which I will look for in the current directory. |
Sounds exciting
|
Interesting; sounds great. Really looking forward to using all of this! |
What does this mean? |
Please see my just added PR #303 This isn't ready to be merged, but is working and shows you what I mean. I couldn't decipher the command-line parser (NDesk.Options is pretty nice, flexible and simple) so at the moment it uses the nuget option to specify the project file of interest. Call with: paket.exe emitfsx nuget <path/to/my.fsproj> and it prints the full list of assemblies with #r needed for a fsx script to explore that project. |
See fsharp/fsharp.github.io@2951570
How should it look like?
The text was updated successfully, but these errors were encountered: