Skip to content

generate references for f# interactive #3299

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

Closed
jackfoxy opened this issue Jul 3, 2017 · 7 comments
Closed

generate references for f# interactive #3299

jackfoxy opened this issue Jul 3, 2017 · 7 comments

Comments

@jackfoxy
Copy link

jackfoxy commented Jul 3, 2017

Please provide a succinct description of the issue.

Feature request, "generate references for f# interactive" FS Power Tools previously did

Provide the steps required to reproduce the problem

right click project, context menu item not available

Expected behavior

Right-click project in solution explorer, select context menu item, 4 fsi directive files create in Scripts folder under project

load-references-debug.fsx
load-project-debug.fsx
load-references-release.fsx
load-project-release.fsx

Actual behavior

n/a

Known workarounds

Similar functionality available in Paket, but I have not tried it

Related information

VS 2017

  • Operating system
  • Branch
  • .NET Runtime, CoreCLR or Mono Version
  • Editing Tools (e.g. Visual Studio Version)
  • Links to F# RFCs or entries on https://github.com/fsharp/fslang-suggestions
  • Links to performance testing scripts
  • Indications of severity
@cartermp
Copy link
Contributor

cartermp commented Jul 3, 2017

Source code is here, for reference (no pun intended): https://github.com/fsprojects/VisualFSharpPowerTools/blob/03c613acd3aa67cb5e3a339d3dcf1c7c783f30c2/src/FSharp.Editing.VisualStudio/Reference/FsiReferenceCommand.fs

Similar functionality available in Paket, but I have not tried it

The Paket capability is quite nice. I definitely recommend it as a workaround.

@forki
Copy link
Contributor

forki commented Jul 4, 2017

@jackfoxy did you see #2483?

@jackfoxy
Copy link
Author

jackfoxy commented Jul 4, 2017

@forki quite a lot for me to come up to speed on, and obviously you and others have put a lot of thought into this. I support the concept of developing tools and techniques that work across IDEs, FSI, and other tools chains.

Restricting the conversation to just VS for now, I want to be able to:

  1. add a new .fsx file in the scripts folder of a F# project within VS and get to work quickly with all the references required

  2. The means of adding the references should be very easy to discover. e.g. a context menu item. If I don't use this for 4 months and forget exactly how, I should be able to discover how and make it work with a minimum of effort, ideally one click.

Making it work the same way across tools chains is a bonus.

@forki
Copy link
Contributor

forki commented Jul 4, 2017

I personally won't add a button to VF#. I think it should be done by someone who is really interested in using it. Otherwise it will always lack the the love that such a feature needs.

That said my question would be what does "and get to work quickly with all the references required" mean for you? What references would it need to add? The nuget dependencies of the fsproj where you right click?

If you use paket then this file is already there. At least if you have the "generate load script" flag set in your dependencies file (see https://fsprojects.github.io/Paket/dependencies-file.html#Generate-load-scripts).
So in this case the right click would be a no-op.
Would that work?

Also if #2483 gets merged things will become even easier. Then you don't need to remember the load scripts at all. Then you just do

#r "paket: nuget FsLab" 

And every thing in FsLab would be available in the script. Package resolution, restore, loading would all be done in the background. That is actually a feature I'd personally use A LOT, so I'm motivated to work on it.

@jackfoxy
Copy link
Author

jackfoxy commented Jul 4, 2017

I like

#r "paket: nuget FsLab" 

As a vs user, working in a Scripts folder of a project should mean I want every reference the project has, as well as references into the public APIs of the project.

With FSPT I could do that with one line

#load "load-project-debug.fsx"

I'll start using

generate_load_scripts: true

but (I assume) that does not gen load statements for the project files, which was a handy feature of the FSPT set-up of gening the references load file, and the project load file which also loaded the references load.

I use Ionide, but I wouldn't say I'm a power user of it. So I have no comment on the set up there. I still prefer VS for serious development.

@forki
Copy link
Contributor

forki commented Jul 4, 2017

Yes it does not load the project. That is true.

@dsyme
Copy link
Contributor

dsyme commented Aug 25, 2017

Duplicate of #2705

@dsyme dsyme marked this as a duplicate of #2705 Aug 25, 2017
@dsyme dsyme closed this as completed Aug 25, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

4 participants