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

Constraining dependencies #2759

Closed
TheAngryByrd opened this issue Sep 12, 2017 · 29 comments
Closed

Constraining dependencies #2759

TheAngryByrd opened this issue Sep 12, 2017 · 29 comments
Labels

Comments

@TheAngryByrd
Copy link
Contributor

Description

I have a project with <TargetFrameworks>netstandard1.6;net462</TargetFrameworks> If I use paket to do the restore I get

 Errors in /app/paket-constrain-framework.fsproj
      Package System.Security.Cryptography.OpenSsl 4.4.0 is not compatible with net462 (.NETFramework,Version=v4.6.2). Package System.Security.Cryptography.OpenSsl 4.4.0 supports:
        - netcoreapp2.0 (.NETCoreApp,Version=v2.0)
        - netstandard1.6 (.NETStandard,Version=v1.6)
        - netstandard2.0 (.NETStandard,Version=v2.0)
      One or more packages are incompatible with .NETFramework,Version=v4.6.2.

Repro steps

https://github.com/TheAngryByrd/paket-constrain-framework

Let me know if there's anything confusing or odd.

Expected behavior

Able to build

Actual behavior

Receive error message as shown above.

Known workarounds

Use nuget 😿

@forki
Copy link
Member

forki commented Sep 13, 2017

/cc @matthid

we have:

System.Security.Cryptography.OpenSsl (4.4) - restriction: || (&& (>= dnxcore50) (>= netstandard1.6)) (&& (>= netstandard1.6) (< monotouch) (< xamarintvos) (< xamarinwatchos) (< xamarinios) (< xamarinmac))

isn't net462 supposed to be compatible to netstandard1.6?

@0x53A
Copy link
Contributor

0x53A commented Sep 13, 2017

Not yet. We are still at Tooling Level 1, so only netstandard1.5

image

@TheAngryByrd
Copy link
Contributor Author

I guess the problem I see is it's choosing the netstandard FSharp.Core package over the netfull for net462.

@TheAngryByrd
Copy link
Contributor Author

Maybe it's because it's labeled as All Frameworks for 4.1.17 ?

@forki
Copy link
Member

forki commented Sep 13, 2017

why are you pinning to 4.1.7?

@TheAngryByrd
Copy link
Contributor Author

Just to be clear it's 4.1.17

.If you're a library author aren't you supposed to choose the lowest version you can? Or is that advice wrong now?

@forki
Copy link
Member

forki commented Sep 13, 2017

the problem ist that version doesn't work with netcore/netstandard

@TheAngryByrd
Copy link
Contributor Author

The dependencies says netstandard1.6 and all frameworks. Is that wrong? Should that be unlisted then?

@forki
Copy link
Member

forki commented Sep 13, 2017

no idea tbh

@TheAngryByrd
Copy link
Contributor Author

Doesn't really matter, FSharp.Core 4.2.3 produces the same problem.

@forki
Copy link
Member

forki commented Sep 13, 2017

yes I think the FSHarp.Core is unrelated. What I wonder is why we have the following:

image

@matthid shouldn't this be filtered out?

@TheAngryByrd
Copy link
Contributor Author

Paket 5.91.0 does not have the issue, seems to start with 5.92.1.

@forki
Copy link
Member

forki commented Sep 13, 2017

yes that was when @matthid splitted the files. I assume it's related

@matthid
Copy link
Member

matthid commented Sep 13, 2017

what does paket why openssl say? (maybe we want an option to track only a particular framework in the future)

shouldn't this be filtered out

yes maybe

seems to start with 5.92.1

not sure why. I splitted the files but the observable behavior of nuget shouldn't have changed (I mean we basically should forward the same info)

@forki
Copy link
Member

forki commented Sep 13, 2017

should ;-)

@forki
Copy link
Member

forki commented Sep 13, 2017

image

@matthid
Copy link
Member

matthid commented Sep 13, 2017

Yes that path shouldn't exist after restricting to net462 ..

@forki
Copy link
Member

forki commented Sep 13, 2017

just took a quick look. looks like the new files are not filterd by the targetframework filter

@matthid
Copy link
Member

matthid commented Sep 13, 2017

  • maybe one of the framework restriction simplifications is invalid
  • or the framework restrictions of the nuget packages are not read in correctly
  • something in delegating the restrictions in the resolver itself.

@matthid
Copy link
Member

matthid commented Sep 13, 2017

or yes the files are written incorrectly

@forki
Copy link
Member

forki commented Sep 13, 2017

the are all the same ;-)

@matthid
Copy link
Member

matthid commented Sep 13, 2017

but tbh the restriction in the lockfile looks aready fishy

@forki
Copy link
Member

forki commented Sep 13, 2017

that is another issue. the current issue is that we generate a files without filtering at all.

@forki forki closed this as completed in 5f6bd1d Sep 13, 2017
@forki
Copy link
Member

forki commented Sep 13, 2017

small correction. it was filtering, but since we didn't clear the list that was not really effective. Anyway new version is under way and should be available in a minute

@forki
Copy link
Member

forki commented Sep 13, 2017

ok 5.96.1 is available

@forki
Copy link
Member

forki commented Sep 13, 2017

and dotnet restore seems to work for your sample

@forki forki added the bug label Sep 13, 2017
@forki
Copy link
Member

forki commented Sep 13, 2017

you might need to clean obj and paket-files folders

@TheAngryByrd
Copy link
Contributor Author

TheAngryByrd commented Sep 13, 2017

🎸 you two rock

@matthid
Copy link
Member

matthid commented Sep 13, 2017

@haf I remeber you encountered probably the same error but cannot find the issue/pr. please try again

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

4 participants