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

Add cross IBCMerge #33282

Merged
merged 5 commits into from
Nov 15, 2018
Merged

Add cross IBCMerge #33282

merged 5 commits into from
Nov 15, 2018

Conversation

DrewScoggins
Copy link
Member

Currently we cannot apply IBC data on Linux so we need to apply the data
on Windows. This script will handle the application of the Linux IBC
data on Windows.

Currently we cannot apply IBC data on Linux so we need to apply the data
on Windows. This script will handle the application of the Linux IBC
data on Windows.
@DrewScoggins
Copy link
Member Author

PTAL @adiaaida @maririos

Copy link
Contributor

@michellemcdaniel michellemcdaniel left a comment

Choose a reason for hiding this comment

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

Are we sure there isn't a better place than the root of the repo to put this? Maybe it can be moved to the eng directory, even though it isn't strictly arcade related?

crossIBC.ps1 Outdated
echo $count
}

.\build.cmd -restore /p:OptionalToolSource=$ToolSource /p:OptionalToolSourceUser=$ToolUser /p:OptionalToolSourcePassword=$ToolPAT /p:EnableProfileGuidedOptimization=true /p:IBCTarget=Linux -release -ci
Copy link
Contributor

Choose a reason for hiding this comment

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

How/where is IBCTarget used?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was added in, dotnet/buildtools#2196. This allows us to specify whether we are pulling down Linux or Windows IBC data

@maririos maririos requested a review from weshaggard November 6, 2018 22:48
crossIBC.ps1 Outdated
Copy-Item $fileToOptimize -Destination $copyLocation
}
}
echo $count
Copy link
Member

Choose a reason for hiding this comment

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

What does $count represent?

Copy link
Member Author

Choose a reason for hiding this comment

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

This was just debug stuff that I forgot to remove. I will take this out.

crossIBC.ps1 Outdated Show resolved Hide resolved
crossIBC.ps1 Outdated Show resolved Hide resolved
@DrewScoggins
Copy link
Member Author

To speak to @adiaaida earlier comment. I am fine putting this in another spot, I don't believe it is necessary for this to be in the root. I was just not sure where it should go. I would be fine putting it in the eng directory, but want to make sure that would not be an issue with Arcade.

@ericstj
Copy link
Member

ericstj commented Nov 7, 2018

but want to make sure that would not be an issue with Arcade.

Nope, we're putting other things in there.

Can you be sure to add some comments to the script explaining what it does or link to documentation in it?

@DrewScoggins
Copy link
Member Author

DrewScoggins commented Nov 7, 2018

Yes, of course. I will comment this up so that it is clear what it is for. I will also move this over into the eng directory.

crossIBC.ps1 Outdated
$IBCMergePath = gci -recurse .\.packages | where {$_.Name.Contains("ibcmerge.exe")}
if(!$IBCMergePath)
{
$IBCMergePath = gci -recurse C:\microsoft.dotnet.ibcmerge | where {$_.Name.Contains("ibcmerge.exe")}
Copy link
Member

Choose a reason for hiding this comment

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

Do you really need to search the C: drive?

Copy link
Member Author

Choose a reason for hiding this comment

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

There is currently a bug in the restore optional tooling step that is causing all of the optional tooling to be restored to the root of the drive. That is why I am searching here.

Copy link
Member

Choose a reason for hiding this comment

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

We should fix that bug rather than depend on it. I hit a similar bug a couple days ago and fixed it: 2e3b5eb#diff-4b2f402501d23abbede6eac0f47783e4R70.

Where's the restore optional tooling step implemented? Sounds like its using the wrong property for the packages folder.

Copy link
Contributor

Choose a reason for hiding this comment

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

Copy link
Member Author

Choose a reason for hiding this comment

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

I did some investigation into this and was unable to figure out why it was restoring to the root. The package dir that was getting set was correct, but when it actually did the restore step it would not write them there.

Copy link
Member Author

Choose a reason for hiding this comment

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

Hmm, when I try and repro this it is now restoring into the .packages directory. I will take out looking for the tool in the root.

@ericstj
Copy link
Member

ericstj commented Nov 7, 2018

Curious why this even needs to be a separate script, why not use a build target and do this in msbuild?

@DrewScoggins
Copy link
Member Author

I started with trying to do this via MSBuild, but ran into issues since I was trying to apply the data from Linux on Windows. I imagine that I could figure this out, but it was much easier to use the powershell script.

@DrewScoggins
Copy link
Member Author

Moved the script over to the eng directory and addressed other points of feedback.

eng/crossIBC.ps1 Outdated
{
if(!$UsePartialNgen)
{
$count = $count + 1
Copy link
Member

Choose a reason for hiding this comment

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

we shouldn't need this anymore

Copy link
Member Author

Choose a reason for hiding this comment

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

Oops. I'll remove this.

eng/crossIBC.ps1 Outdated
}
}

cd ..
Copy link
Contributor

Choose a reason for hiding this comment

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

Why are we changing up a directory?

Copy link
Member Author

Choose a reason for hiding this comment

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

Because the script was meant to run from the root of the repo and we are in the eng dir. I could add a parameter that we could pass in that is the full path to the root of the directory as well.

Copy link
Member

Choose a reason for hiding this comment

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

Better to be more specific about directories in case one day the structure of the repo changes

Copy link
Contributor

Choose a reason for hiding this comment

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

Agreed

Copy link
Member Author

Choose a reason for hiding this comment

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

This should be taken care of

Copy link
Contributor

@michellemcdaniel michellemcdaniel left a comment

Choose a reason for hiding this comment

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

LGTM!

Copy link
Member

@maririos maririos left a comment

Choose a reason for hiding this comment

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

Make sure to delete $count = $count + 1 before merging

@DrewScoggins DrewScoggins merged commit e0cb81d into dotnet:master Nov 15, 2018
@karelz karelz added this to the 3.0 milestone Nov 15, 2018
jlennox pushed a commit to jlennox/corefx that referenced this pull request Dec 16, 2018
* Add cross IBCMerge

Currently we cannot apply IBC data on Linux so we need to apply the data
on Windows. This script will handle the application of the Linux IBC
data on Windows.

* Address feedback

* Move script to eng dir

* Add path parameter

* Remove debug code
picenka21 pushed a commit to picenka21/runtime that referenced this pull request Feb 18, 2022
* Add cross IBCMerge

Currently we cannot apply IBC data on Linux so we need to apply the data
on Windows. This script will handle the application of the Linux IBC
data on Windows.

* Address feedback

* Move script to eng dir

* Add path parameter

* Remove debug code


Commit migrated from dotnet/corefx@e0cb81d
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.

6 participants