Skip to content
This repository has been archived by the owner on Jan 23, 2023. It is now read-only.

Ensure that platform is considered for LongPlatformName instead of PackagePlatform #11900

Merged
merged 1 commit into from
Jun 1, 2017

Conversation

karajas
Copy link
Member

@karajas karajas commented May 24, 2017

… overriden

Microsoft.NETCore.Runtime.CoreCLR now has mscordaccore_amd64_amd64_4.6.25324.00.dll instead of mscordaccore_AnyCPU_AnyCPU_4.6.25324.00.dll.

@ellismg

@ellismg
Copy link

ellismg commented May 24, 2017

Thank you for doing this, Karthik!

/cc @ericstj @mikem8361 @gkhanna79

@ellismg ellismg requested review from chcosta and wtgodbe May 24, 2017 23:54
@gkhanna79
Copy link
Member

Thank you for fixing this - we should get this in for 2.0.0 as well.

@mikem8361 Does the resulting name for the DAC look sane to you?

@ericstj
Copy link
Member

ericstj commented May 25, 2017

If you make this change you should do a full build with and without and diff the output. PackagePlatform/Platform have a complicated mix of interactions. In particular, make sure you didn't cause package Ids or folders to use amd64 instead of x64.

To fix a similar issue I just switched to using Platform instead. 7c53fc2

That might be the right thing to do here. /cc @chcosta

@chcosta
Copy link
Member

chcosta commented May 25, 2017

+1 to what Eric said. The change is small, but testing this and validating all package names are unchanged / binary output locations are identical will be the majority of work. It's really easy to break this and not discover it until a week or two later. I'm not opposed to this change, I'm just stating that spending an extra day testing will save lots of headaches down the road.

@karajas
Copy link
Member Author

karajas commented May 26, 2017

Ok from diffing it looks like the only changes happen in the transport.Microsoft.NETCore.Runtime.CoreCLR packages, which is expected.

In the unchanged version I see in the nuspec

    <file src="D:\git\coreclr\bin\Product\Windows_NT.x64.Debug\mscordaccore.dll" target="runtimes\win7-x64\native\mscordaccore_AnyCPU_AnyCPU_4.6.25324.00.dll" exclude="" />
    <file src="D:\git\coreclr\bin\Product\Windows_NT.x64.Debug\sos.dll" target="runtimes\win7-x64\native\sos_AnyCPU_AnyCPU_4.6.25324.00.dll" exclude="" />

And in the changed version I see

    <file src="D:\git\coreclr\bin\Product\Windows_NT.x64.Debug\mscordaccore.dll" target="runtimes\win7-x64\native\mscordaccore_amd64_amd64_4.6.25324.00.dll" exclude="" />
    <file src="D:\git\coreclr\bin\Product\Windows_NT.x64.Debug\sos.dll" target="runtimes\win7-x64\native\sos_amd64_amd64_4.6.25324.00.dll" exclude="" />

I've only looked at the Windows_NT output
Does this seem acceptable or is there something else I should look for?

@karajas
Copy link
Member Author

karajas commented May 26, 2017

Updated this to be localized to just the area

@karajas karajas changed the title Allow PackagePlatform to be used by LongPlatformName instead of being… Ensure that platform is considered for LongPlatformName instead of PackagePlatform May 26, 2017
@karajas
Copy link
Member Author

karajas commented May 26, 2017

PTAL @chcosta @ellismg @ericstj

@@ -3,7 +3,7 @@
<PropertyGroup>
<PackageTargetRuntime>$(MinOSForArch)-$(PackagePlatform)</PackageTargetRuntime>
<LongNamePlatform>$(PackagePlatform)</LongNamePlatform>
<LongNamePlatform Condition="'$(LongNamePlatform)'=='x64'">amd64</LongNamePlatform>
<LongNamePlatform Condition="'$(Platform)'=='x64'">amd64</LongNamePlatform>
Copy link

Choose a reason for hiding this comment

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

Just so I understand, when we build for x86 (Windows), $(Platform) is x86 right?

Copy link
Member

@ericstj ericstj May 26, 2017

Choose a reason for hiding this comment

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

Seems like you should change both of these lines rather than just the amd64 one. Test on other archs to be sure.

@chcosta
Copy link
Member

chcosta commented May 26, 2017

LGTM (except for the CI failure)

@gkhanna79
Copy link
Member

@mikem8361 @noahfalk PTAL.

@gkhanna79
Copy link
Member

@karajas Does this change need to go into Preview2?

@mikem8361
Copy link
Member

LGTM. And yes this should go into Preview 2. Our windows debuggers look for the long names on the symbol servers. This is also a regression from 1.1.

@karajas
Copy link
Member Author

karajas commented May 30, 2017

@dotnet-bot test OSX10.12 x64 Checked Build and Test please

@karajas
Copy link
Member Author

karajas commented May 30, 2017

@ericstj Just to confirm this does not need to be applied to arm and arm64?

@gkhanna79
Copy link
Member

I think it needs to be applied to those as well. Is there a reason you think it should not be?

@karajas
Copy link
Member Author

karajas commented May 30, 2017

@gkhanna79 I was wondering if it was the earlier issue of having arm be labelled x86_arm and arm64 as amd64_arm

@gkhanna79
Copy link
Member

For Windows arm, it should be x86_arm. For Windows arm64, it should be amd64_arm64.

For Linux and OSX, we have no such cross targeting components yet.

@karajas
Copy link
Member Author

karajas commented May 31, 2017

Thanks I will update it be as such.

@karajas karajas force-pushed the fixDacDll branch 3 times, most recently from ea747a8 to 44c6219 Compare May 31, 2017 16:22
@karajas
Copy link
Member Author

karajas commented May 31, 2017

PTAL.

@ericstj
Copy link
Member

ericstj commented May 31, 2017

I think you need to be looking at the diff in package content not the diff in these targets files. That will also help you understand if you're changing things you're not intending. Please share the diff of nuspecs on all platforms.

@ericstj
Copy link
Member

ericstj commented Jun 1, 2017

Note that there are two renamed DACs and two SOSs for both ARM and ARM64. The ones that are native for that arch, and the ones in the cross-targeting folder.

@mikem8361
Copy link
Member

Then everything is fine and we can go ahead and commit this PR.

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

@ericstj
Copy link
Member

ericstj commented Jun 1, 2017

I don't think so. @mikem8361 please look at the explicit diffs for all the files. I'm pretty certain stuff is busted there.

@mikem8361
Copy link
Member

mikem8361 commented Jun 1, 2017 via email

@mikem8361
Copy link
Member

@leculver can you check my understanding of the long naming (the previous post)?

@leculver
Copy link

leculver commented Jun 1, 2017

Sorry for the delay. @mikem8361 Your explanation of the naming is correct.

We expect the arm64_arm64 to be built for the arm64 platform and run natively on those machines. We expect the AMD64_arm64 to be compiled for x64 machines (not arm machines) to debug arm64 issues.

@ericstj Can you be more specific as to what looks busted to you?

@ericstj
Copy link
Member

ericstj commented Jun 1, 2017

I was referring to the previous diffs that @karajas shared in #11900 (comment), which @mikem8361 was addressing when he said #11900 (comment). I agree that the most recent diff @karajas shared for ARM64 here looks better. These previous diffs: https://gist.github.com/karajas/a75968be6fe0fd271c0e7b0bc9c0dd69/revisions#diff-544ad00592cc55861e12be35f3b7552cR49 and https://gist.github.com/karajas/a75968be6fe0fd271c0e7b0bc9c0dd69/revisions#diff-544ad00592cc55861e12be35f3b7552cR61 for ARM are what appear busted as they don't match the pattern you've described. I suspect those are just out of date since @karajas now has a new commit since I made the comment.

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

I will put up the full diff with the new changes for x86, x64, ARM and ARM64 shortly

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

@dotnet-bot test Windows_NT x64 Debug Build and Test please

@gkhanna79
Copy link
Member

@gkhanna79
Copy link
Member

ANYCPU on x64 diff as well.

@gkhanna79
Copy link
Member

Seems like ANYCPU is everywhere.

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

The red on the left is before the change and the green is what changed after the change.

@gkhanna79
Copy link
Member

You have ANYCPU in green at the very end of the change. PTAL.

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

Ah I see what's happening the line you clicked on was in the initial revision when I added the file. When you click on a line in the older revision, it looks like it picks up the same line in the current revision so that's why I was confused.

That green AnyCPU on the right is from creating the initial gist with the package output prior to the change.

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

Can I get sign off on this change?

@gkhanna79
Copy link
Member

@mikem8361 Can you signoff on this if this looks good to you?

@karajas
Copy link
Member Author

karajas commented Jun 1, 2017

Got an offline LGTM.

@mikem8361
Copy link
Member

LGTM

@karajas karajas merged commit 91329ce into dotnet:master Jun 1, 2017
@karelz karelz modified the milestone: 2.1.0 Aug 28, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

9 participants