-
Notifications
You must be signed in to change notification settings - Fork 3
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
Use Microsoft SDK Hive directly #366
Conversation
cbf86e5
to
df3bf12
Compare
@paketo-buildpacks/dotnet-core-maintainers I'll go in and update the dep-server metadata for the versions in this iteration of the buildpack once this is approved. However, I'm wondering if it's at all problematic to swap over versions to the Microsoft versions if we've already shipped buildpacks with that version? |
- URI and SHA in buildpack.toml are the same as the source URI and SHA - No longer `require` dotnet-runtime - Look at BP_DOTNET_FRAMEWORK_VERSION as a version source instead of RUNTIME_VERSION - Consider `*.*proj` files as a version source - Remove `DOTNET_ROOT` symlinking
df3bf12
to
c011576
Compare
I think that's probably fine. Maybe we call this a minor version bump instead of a patch? |
@fg-j there's already a minor bump label on here! |
@sophiewigmore did you happen to test run these changes against paketo-buildpacks/dotnet-core#703 or paketo-buildpacks/dotnet-core#670? |
@fg-j Yes, I saw a successful build of https://github.com/blogifierdotnet/Blogifier with:
I was able to curl the page and see the Blogifier app.
I'd love for someone else to try it out as well if they have the time. It requires the |
@sophiewigmore Since you've taken it for a spin, I'll probably wait to do that as an acceptance step at the language family level before we cut a release. |
c011576
to
321c7bc
Compare
sdkLayer.BuildEnv.Prepend("PATH", sdkLayer.Path, string(os.PathListSeparator)) | ||
logger.EnvironmentVariables(sdkLayer) | ||
envLayer.LaunchEnv.Prepend("PATH", filepath.Join(context.WorkingDir, ".dotnet_root"), string(os.PathListSeparator)) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Is setting one in the BuildEnv and the other in the LaunchEnv to prevent a case where both layers put a version of the dotnet
CLI on the PATH
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not quite, it's more to prevent more than what's needed being available during launch. The dotnet
CLI in both cases is the same. This is confusing and I would've liked to find a way to avoid doing this. The reason for this code is:
- The first case is in the .NET Publish case, we want the full SDK hive, so we make the entire SDK layer available on the
PATH
during build. - The less obvious case is in the .NET Execute case (FDD case specifically), the
dotnet
CLI is needed at launch-time, so we just copy it into the/workspace/.dotnet_root
to isolate it, and make it accessible via thePATH
. ThisenvLayer
is ALWAYS marked forlaunch
.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you can think of a nicer way to just have the dotnet
CLI available at launch-time, let me know, I'm all ears.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks for laying this out. That makes sense to me. I agree it's not the nicest, but I'm ok with it for now because Forest + my forthcoming proposal to expand the ASP.NET dependency + rearrange buildpack order will enable us to use the dotnet
CLI that ships with ASP.NET at launch time in the future!
Summary
Part of paketo-buildpacks/dotnet-core#722
Use the Microsoft official SDK download, which includes the runtime and libraries, instead of the Paketo-hosted, stripped down version
** Note ** the URI and SHA are hardcoded. A separate PR to update the dep-server metadata will go in after this PR is merged for future versions.
Other changes:
URI
and SHA in buildpack.toml are the same as the sourceURI
andSHA
require
dotnet-runtime, as it's included in the SDKBP_DOTNET_FRAMEWORK_VERSION
as a version source instead ofRUNTIME_VERSION
*.*proj
files as a version sourceDOTNET_ROOT
symlinking in favour of copying the .NET CLI into the/workspace/.dotnet_root
and making it available on the path at launch-time. This is necessary for the FDD case, which will need access to the CLI at launch.Use Cases
Checklist