-
Notifications
You must be signed in to change notification settings - Fork 4.9k
Conversation
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.
PTAL @adiaaida @maririos |
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.
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 |
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.
How/where is IBCTarget used?
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.
This was added in, dotnet/buildtools#2196. This allows us to specify whether we are pulling down Linux or Windows IBC data
crossIBC.ps1
Outdated
Copy-Item $fileToOptimize -Destination $copyLocation | ||
} | ||
} | ||
echo $count |
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.
What does $count
represent?
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.
This was just debug stuff that I forgot to remove. I will take this out.
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. |
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? |
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")} |
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.
Do you really need to search the C: drive?
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.
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.
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.
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.
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.
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.
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.
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.
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.
Curious why this even needs to be a separate script, why not use a build target and do this in msbuild? |
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. |
Moved the script over to the eng directory and addressed other points of feedback. |
eng/crossIBC.ps1
Outdated
{ | ||
if(!$UsePartialNgen) | ||
{ | ||
$count = $count + 1 |
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.
we shouldn't need this anymore
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.
Oops. I'll remove this.
eng/crossIBC.ps1
Outdated
} | ||
} | ||
|
||
cd .. |
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.
Why are we changing up a directory?
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.
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.
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.
Better to be more specific about directories in case one day the structure of the repo changes
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.
Agreed
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.
This should be taken care of
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.
LGTM!
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.
Make sure to delete $count = $count + 1
before merging
* 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
* 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
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.