Skip to content
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

replace fake header with FST-1027 - Beta 013 #1770

Merged
merged 15 commits into from Feb 3, 2018
Merged

replace fake header with FST-1027 - Beta 013 #1770

merged 15 commits into from Feb 3, 2018

Conversation

@matthid
Copy link
Collaborator

@matthid matthid commented Jan 29, 2018

See #1768

I decided to support `#r "paket:". As we use the FCS-Tokenizer multi-line strings and similar things work.
In fact

#r "paket:
storage: none
source https://nuget.org/api/v2
source ../../../nuget/dotnetcore
 
nuget Fake.Core.Target prerelease
nuget FSharp.Core prerelease"

Looks quite nice.

As this currently prints

E:\Projects\faketest\myscript.fsx (1,0)-(6,31): Warning FS0213: 'paket:
storage: none
source https://api.nuget.org/v3/index.json

nuget Fake.Core.Target prerelease
nuget Fake.Net.Http prerelease' is not a valid assembly name

The natural way to do it is:

#if FAKE_DEPENDENCIES
#r "paket:
storage: none
source https://nuget.org/api/v2
source ../../../nuget/dotnetcore
 
nuget Fake.Core.Target prerelease
nuget FSharp.Core prerelease"
#endif

Another way would be to disable warning FS0213 (at least for strings starting with paket: )

@matthid
Copy link
Collaborator Author

@matthid matthid commented Jan 30, 2018

Even better: As this thing is a warning only we can ignore that.

Maybe I can get @Krzysztof-Cieslak or @enricosada to remove this warning from Ionide as well (or even better provide intellisense within the paket: string...)

Now

#r "paket:
storage: none
source https://nuget.org/api/v2
source ../../../nuget/dotnetcore
 
nuget Fake.Core.Target prerelease
nuget FSharp.Core prerelease"

works without warning. Now I'll try to get the defaults right, such that storage:none and the NuGet default source is not required (only when no other source is given)

@Krzysztof-Cieslak
Copy link
Contributor

@Krzysztof-Cieslak Krzysztof-Cieslak commented Jan 30, 2018

Both disabling warning in this particular case, and providing intellisense inside those strings should be doable and not too complex.

@matthid
Copy link
Collaborator Author

@matthid matthid commented Feb 3, 2018

Now we get

#r "paket:
nuget Fake.Core.Target prerelease
nuget FSharp.Core prerelease"

Because we default to storage:none and the default NuGet source.

@matthid
Copy link
Collaborator Author

@matthid matthid commented Feb 3, 2018

Ok if any string is given in #r "paket: <data>" and <data> is by accident a valid filename, the compiler will emit error FS0078 instead of a warning:

C:\projects\fake-6w516\integrationtests\core-use-external-paket-dependencies\temp\use_external_dependencies.fsx (1,0)-(1,25): Error FS0078: Unable to find the file 'paket: groupref Main' in any of

I hope the workaround is to use #r "paket: <data> // and paket allows in-line comments.

@matthid matthid merged commit 4821261 into master Feb 3, 2018
0 of 4 checks passed
0 of 4 checks passed
continuous-integration/appveyor/branch Waiting for AppVeyor build to complete
Details
continuous-integration/appveyor/pr Waiting for AppVeyor build to complete
Details
continuous-integration/travis-ci/pr The Travis CI build is in progress
Details
continuous-integration/travis-ci/push The Travis CI build is in progress
Details
@matthid matthid deleted the improve_header branch Mar 9, 2018
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

2 participants