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

Adding x64 emulation support for pkg installers #7893

Merged
merged 3 commits into from
Sep 16, 2021

Conversation

sfoslund
Copy link
Member

No description provided.

@sfoslund sfoslund requested a review from ericstj September 13, 2021 23:30

choiceElements = BundledPackages
.SelectMany(component => {
var visibleAttribute = new XAttribute("visible", "true");
Copy link
Member

Choose a reason for hiding this comment

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

Will this make both choices visible, or will only the selected choice be visible? If both would be visible, maybe we'd want this to mirror the value of selected.

Copy link
Member Author

Choose a reason for hiding this comment

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

As far as I can tell, only the selected choice is visible. I'm not sure how to double check this though, as there doesn't seem to be any documentation.

Copy link
Member

@ericstj ericstj Sep 16, 2021

Choose a reason for hiding this comment

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

there doesn't seem to be any documentation.

That's an understatement. This whole area is very cryptically documented, I think we have to go with "try it and see".

So long as you don't see both choices visible then I think it should be OK. We want to make sure that the user doesn't really have the option to toggle this behavior, nor do they see side effects of it.

Copy link
Member

@dagood dagood left a comment

Choose a reason for hiding this comment

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

I haven't worked with this code, the changes look reasonable, though. I have some style suggestions if they're helpful.

@ericstj
Copy link
Member

ericstj commented Sep 14, 2021

@dagood, I had included you as I thought you did the mac installer work in the past. If not do you happen to know who originally wrote the code for GenerateMacOSDistributionFile? I see @jkoritzinsky added this, but I thought that was refactoring however I cannot find a previous instance of this task, so maybe it was new.

@dagood
Copy link
Member

dagood commented Sep 14, 2021

The task is completely new for the new target framework SDK: #5714. The way the templating worked changed. (I didn't review that in depth.)

The distribution XML I worked with earlier was https://github.com/dotnet/core-setup/blob/master-archive/src/pkg/packaging/osx/sharedframework/shared-framework-distribution-template.xml, which was pretty simple and never changed, so I never got in-depth knowledge. (Unfortunately. 😄)

/cc @dleeapho

Copy link
Member

@ericstj ericstj left a comment

Choose a reason for hiding this comment

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

This looks good to me, modulo one minor suggestion.

@sfoslund sfoslund force-pushed the MacPkgGenerationEmulation branch from f0e60ba to 762a0c0 Compare September 16, 2021 20:47
@@ -30,6 +30,8 @@ public class GenerateMacOSDistributionFile : BuildTask
[Required]
public string DestinationFile { get; set; }

public string Alternativex64InstallPath { get; set; }
Copy link
Member

@ericstj ericstj Sep 16, 2021

Choose a reason for hiding this comment

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

What's the use case for this parameter?
Maybe we should expose it in the targets

<GenerateMacOSDistributionFile
TemplatePath="$(MacOSBundleTemplate)"
ProductBrandName="$(ProductBrandName)"
TargetArchitecture="$(TargetArchitecture)"
BundledPackages="@(_MacOSPackagesToBundle)"
DestinationFile="$(_MacOSDistributionFile)" />

And default it in targets instead of code?
<_MacOSSharedInstallDir>/usr/local/share/dotnet</_MacOSSharedInstallDir>

That could allow for overriding, that said the current path is a private property set unconditionally, so it's not exactly extensible. Also I don't have a scenario today for any product consuming this SDK that might want to opt out of redirection or set its own path, so maybe we don't even need the parameter.

@jkoritzinsky @NikolaMilosavljevic - can you please make a call on that?

Copy link
Member Author

Choose a reason for hiding this comment

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

It's an optional parameter for task, so it can be specified or not specified in calls to this task in a target. AFAIK, defaulting in the targets instead of in the task as it is now would be functionally the same.

Copy link
Member

Choose a reason for hiding this comment

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

Right, but the targets don't expose it, so we could just delete it since folks don't have a way of specifying it today. IMHO we should make both of these paths behave a similar way and be co-located since they address the same concern, but I don't own this codebase so I'd like to hear from the owners. We could always clean this up later since it doesn't impact actual functionality.

@sfoslund sfoslund merged commit 734d875 into main Sep 16, 2021
@sfoslund sfoslund deleted the MacPkgGenerationEmulation branch September 16, 2021 22:49
ericstj pushed a commit to ericstj/arcade that referenced this pull request Sep 17, 2021
* Adding x64 emulation support for pkg installers

* PR feedback

* PR feedback
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