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

[Really Ready] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core #2528

Merged
merged 3 commits into from
Aug 21, 2017

Conversation

0x53A
Copy link
Contributor

@0x53A 0x53A commented Jul 15, 2017

disable implicitly adding system.valuetuple and fsharp.core
fail when a sdk f# project does not contain a reference to fsharp.core

context: dotnet/fsharp#3335 (comment)

@forki
Copy link
Member

forki commented Jul 16, 2017

fail when a sdk f# project does not contain a reference to fsharp.core

I don't think we need to do that. This is basically a thing that will happen later in build. We should not have this in paket.exe itself.

@0x53A
Copy link
Contributor Author

0x53A commented Jul 16, 2017

I don't think we need to do that. This is basically a thing that will happen later in build. We should not have this in paket.exe itself

Thats the big issue - if you dont' pass any FSharp.Core to the compiler, it will silently pick any random one.

@forki
Copy link
Member

forki commented Jul 16, 2017

if you dont' pass any FSharp.Core to the compiler, it will silently pick any random one

how? I think the targets file changes forbid that!?

@0x53A
Copy link
Contributor Author

0x53A commented Jul 16, 2017

Please test it, maybe i missed something, but afaik it does not error out.

@forki
Copy link
Member

forki commented Jul 16, 2017

If you have a repro? Can you please report that to visualfsharp? It should not implicitly add things when you explicitly set the flag, right?

@0x53A
Copy link
Contributor Author

0x53A commented Jul 16, 2017

Will do

@forki
Copy link
Member

forki commented Jul 16, 2017

can you please send a second PR that only sets the properties in the targets file?

@0x53A
Copy link
Contributor Author

0x53A commented Jul 16, 2017

I don't think that is a good idea.

When you do dotnet new and paket convert, the resulting project will be broken (and still compiling, so the user doesn't notice it).

I would say let's wait for a response on that issue, maybe there is a compilerflag to disable the magic core reference?

@0x53A
Copy link
Contributor Author

0x53A commented Jul 16, 2017

Great, locally I have the same three PathTooLongException failures, but I also have one that may be more interesting:

image


Edit:

Cause:

The specified SDK version [2.0.0-alpha-005165] from global.json [C:\source\Paket\global.json] not found; install specified SDK version
Did you mean to run dotnet SDK commands? Please install dotnet SDK from:
http://go.microsoft.com/fwlink/?LinkID=798306&clcid=0x409

It is picking up the global.json from the paket root folder. Probably a good idea to hardcode the cli version.

@matthid
Copy link
Member

matthid commented Jul 16, 2017

It feels like this test needs to be reworked. It's not working on travis either, see here

@0x53A
Copy link
Contributor Author

0x53A commented Jul 17, 2017

I need to test if it actually works (probably doesn't, I know myself =) ), and a few unit tests would also be nice, but from my side this is mostly finished.

As it stands, it adds FSharp.Core on convert-from-nuget and warns (I downgraded it from an error) on install if a v15 F# project does not reference FSharp.Core.

What do you think?

@0x53A
Copy link
Contributor Author

0x53A commented Aug 3, 2017

Manual test:

  1. dotnet new lib -lang F#
  2. paket convert-from-nuget
  3. Check that both paket.dependencies and paket.references contain FSharp.Core ✔
  4. manually remove FSharp.Core from paket.references
  5. Check that a warning was printed ✔
    image

CI fails with __ PathTooLongException__ :\

@0x53A 0x53A force-pushed the paket-and-dotnet-and-fs branch from e1281d7 to cd4d874 Compare August 9, 2017 17:41
@0x53A 0x53A changed the title [wip] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core [Readz] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core Aug 13, 2017
@0x53A 0x53A changed the title [Readz] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core [Ready] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core Aug 13, 2017
@forki
Copy link
Member

forki commented Aug 17, 2017

what is the status?

@0x53A 0x53A force-pushed the paket-and-dotnet-and-fs branch from b656db7 to bb317e7 Compare August 19, 2017 18:16
@0x53A
Copy link
Contributor Author

0x53A commented Aug 19, 2017

Ready from my side.

CI errors seem unrelated, but please verify.

I've rebased it on master, which wiped the CI history, so here is a link to the previous CI result: https://ci.appveyor.com/project/SteffenForkmann/paket/build/0.0.1.9005

@0x53A
Copy link
Contributor Author

0x53A commented Aug 20, 2017

AppVeyor: PathTooLongException
Travis: each stage passed at least once ;-)
image

@matthid
Copy link
Member

matthid commented Aug 20, 2017

Maybe we can add long-path support for the test suite on appveyor (via App.Config). We don't really care about too long paths there. As the appveyor is green on master and our only check right now I think we need it to be green here as well. Or we wait for #2584?

@0x53A
Copy link
Contributor Author

0x53A commented Aug 20, 2017

Kay, let me shorten the scenario names a bit ...

0x53A added 2 commits August 20, 2017 16:52
warn when a sdk f# project does not contain a reference to fsharp.core
@0x53A 0x53A force-pushed the paket-and-dotnet-and-fs branch from 07c44f8 to 4a7f53f Compare August 20, 2017 14:54
@0x53A 0x53A changed the title [Ready] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core [Really Ready] dotnet sdk: disable implicitly adding system.valuetuple and fsharp.core Aug 20, 2017
@0x53A
Copy link
Contributor Author

0x53A commented Aug 20, 2017

@matthid green

Copy link
Member

@matthid matthid left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Looks good to me.

@@ -227,6 +227,22 @@ let createPackageRequirement sources (packageName, versionRange, restrictions) d
TransitivePrereleases = false
Graph = Set.empty }

let private isFSharpproject (projectFileName:string) =
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

isFSharpProject ?

@0x53A
Copy link
Contributor Author

0x53A commented Aug 20, 2017

image

If I understand it correctly, Pack does a Restore, which goes to github, and doesn't seem to be cached.

@0x53A 0x53A closed this Aug 20, 2017
@0x53A 0x53A reopened this Aug 20, 2017
@matthid
Copy link
Member

matthid commented Aug 20, 2017

Would be interesting to see WHAT is not cached. We had some problems with the bootstrapper in the past (where dotnet was calling the bootstrapper in magic mode).
Maybe we need to set some verbose flags:

  • PAKET_BOOTSTRAPPER_TRACE=true allows to set the bootstrapper into verbose mode.
  • you maybe can temporarily add "-v" to the paket targets file.

This is when this error is actually reproducible.

@0x53A
Copy link
Contributor Author

0x53A commented Aug 20, 2017

no idea - I think this may not actually be an issue with paket, because the build in my fork also failed with the same error. So it seems the AppVeyor Datacenter as a whole hit the limit.

Anyway, now it is green again.

@forki
Copy link
Member

forki commented Aug 21, 2017

thanks!

@forki forki merged commit 28576a5 into fsprojects:master Aug 21, 2017
@0x53A 0x53A deleted the paket-and-dotnet-and-fs branch August 21, 2017 12:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants