flathub / org.freedesktop.Sdk.Extension.dotnet7

https://flathub.org/apps/details/org.freedesktop.Sdk.Extension.dotnet7
6 stars 0 forks source link

Install script must be run in a particular order when following the README #5

Open dylanmccall opened 1 year ago

dylanmccall commented 1 year ago

In flathub/flathub#4009, I learned that if I follow the README for this extension, I must run /usr/lib/sdk/dotnet7/bin/install.sh after running dotnet publish. If I run install.sh first, the dotnet publish command fails, saying that the SDK isn't installed.

This happens because we append the SDK to the path (using "build-options": { "append-path": "/usr/lib/sdk/dotnet7/bin" }), and both the dotnet SDK and the dotnet runtime use the same dotnet command. After we run the install script, the runtime version takes precedence.

The problem I see is that this behaviour is rather unexpected, and it isn't mentioned in the README. For my project, I switched to using prepend-path so that the order in which we list modules is less particular.

Dryadxon commented 1 year ago

Thanks for reporting, but I notice that in your manifest the install.sh and dotnet publish commands are into two separate modules, the README of this extension, however, suggests putting them in the same, is there a particular reason why you did it this way? If separating them is a common use case, I will update the README hinting the use of the full path to the SDK executable to avoid the ordering issue.