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

nupkg files require all architectures even with selective builds #113

Open
mitchcapper opened this issue Sep 11, 2024 · 3 comments
Open

Comments

@mitchcapper
Copy link
Contributor

While #100 initially covered this the final implementation either intentionally or not no longer templates the spec files.

This can cause it to try and restore arm64 binaries when only x64 packages are built. This doesn't require major changes but for arm64 removal for example modifying:
https://github.com/cefsharp/cef-binary/blob/master/NuGet/chromiumembeddedframework.runtime.json?#L13-L17

and potentially:
https://github.com/cefsharp/cef-binary/blob/master/NuGet/chromiumembeddedframework.runtime.nuspec?#L30

it requires some in the main project too (as otherwise the manual copies still try) but probably there straight conditionals would work:
https://github.com/cefsharp/CefSharp/blob/05577b7bf3933a057d42dabe0dc915676f9463a8/NuGet/PackageReference/CefSharp.Common.NETCore.targets?#L204-L224

I can do another PR to either remove these lines when select architectures are specified or go back to a templating system or nothing if it isn't desired for general support of select building.

@amaitland
Copy link
Member

This doesn't require major changes but for arm64 removal for example modifying:

hmm, I guess this is a problem if you don't specify a RuntimeIdentifier. If you are specifying specific runtime identifiers then I wouldn't have though it would be a problem. I always build with a RuntimeIdentifier set.

and potentially:
https://github.com/cefsharp/cef-binary/blob/master/NuGet/chromiumembeddedframework.runtime.nuspec?#L30

Creating an empty directory might be easier than trying to modify the file.

it requires some in the main project too (as otherwise the manual copies still try) but probably there straight conditionals would work:
https://github.com/cefsharp/CefSharp/blob/05577b7bf3933a057d42dabe0dc915676f9463a8/NuGet/PackageReference/CefSharp.Common.NETCore.targets?#L204-L224

If you build with a RuntimeIdentifier those shouldn't be a problem.

Are you not setting a RuntimeIdentifier when building in VS?

Pull request are as always welcome. If there's a specific scenario you need to support, I'm sure we can come up with something workable.

@amaitland
Copy link
Member

@mitchcapper Any further thoughts on what's required here?

@mitchcapper
Copy link
Contributor Author

It is possible I had not applied RuntimeIdentifier early enough (between that and platform and platformtarget I don't remember the initial combo) as I would assume it is clearly needed before any restore now. The empty folder for the copying seems straightforward but I am not sure how https://github.com/cefsharp/CefSharp/blob/05577b7bf3933a057d42dabe0dc915676f9463a8/NuGet/PackageReference/CefSharp.Common.NETCore.targets?#L204-L224 would still not cause an issue if no arm packages were built? I would have assumed some conditionals might need to be required.

In terms of for me I generally don't need any of these things nor backports. I normally have already written the work around to use to get it building but if it ends up in cefsharp I can then just back the patches out.

Something like this where we are talking about the automated building of select cef-binary packages may be too niche but im happy to implement something that works (if needed).

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

No branches or pull requests

2 participants