Skip to content

Conversation

@trylek
Copy link
Member

@trylek trylek commented Nov 24, 2020

I believe this to be the minimum change to facilitate removal of
the duplicated "src" folder level under "src/coreclr" in the
runtime repo. Before the removal we'll need to make a coordinated
runtime change to pass the source directory as "src/jit" instead
of just "jit"; the removal PR should subsequently change the
"src/jit" folder as the input argument to jit-format to just "jit".

Thanks

Tomas

Related to: dotnet/runtime#44973

P.S. This is my first chance at a jitutils PR, thanks in advance for your
patience with me; I currently don't know how to test this without
merging in both this change and the envisioned runtime counterpart,
please let me know if you believe there's an easier way.

I believe this to be the minimum change to facilitate removal of
the duplicated "src" folder level under "src/coreclr" in the
runtime repo. Before the removal we'll need to make a coordinated
runtime change to pass the source directory as "src/jit" instead
of just "jit"; the removal PR should subsequently change the
"src/jit" folder as the input argument to jit-format to just "jit".

Thanks

Tomas
Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

Minor suggestion.

Console.WriteLine("Formatting jit directory.");
}
_srcDirectory = "jit";
_srcDirectory = "src/jit";
Copy link
Contributor

Choose a reason for hiding this comment

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

Path.Combine("src", "jit");

Copy link
Member Author

Choose a reason for hiding this comment

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

Good point, thanks, fixed in 2nd commit.

Copy link
Contributor

@BruceForstall BruceForstall left a comment

Choose a reason for hiding this comment

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

LGTM after fixing Kunal's suggestion.

You can test this locally running jit-format, but the real test requires you to merge it, and then the next dotnet/runtime PR will automatically pick up the change (it clones the jitutils repo)

@kunalspathak
Copy link
Contributor

To test, you could locally run jit-format:

c:\jitutils>bootstrap.cmd
<<builds everything>>

c:\jitutils>bin\jit-format -a x64 -b Checked -c D:\git\dotnet-runtime\src\coreclr --verbose --fix --projects dll

Copy link
Contributor

@kunalspathak kunalspathak left a comment

Choose a reason for hiding this comment

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

LGTM. Thanks!

@trylek
Copy link
Member Author

trylek commented Nov 24, 2020

@kunalspathak, @BruceForstall - turns out the jit-format tool was actually missing the definition of the command-line argument to let us specify the source path. I have added it in the latest iteration; could you please take another look when you have a chance?

@kunalspathak
Copy link
Contributor

kunalspathak commented Nov 24, 2020

@kunalspathak, @BruceForstall - turns out the jit-format tool was actually missing the definition of the command-line argument to let us specify the source path. I have added it in the latest iteration; could you please take another look when you have a chance?

I don't think it is needed. We set it correctly to "jit" folder inside validate() method if it is null (which will be the case always). Unless I misunderstood your proposal, the changes you had before your latest commit should serve the purpose. When we remove "src" directory, we will just change from Path.Combine("src", "jit") back to "jit".

@trylek
Copy link
Member Author

trylek commented Nov 24, 2020

Hmm, my original thinking was that with the extra parameter the December rollout would be doable by just making a runtime change; without it, the rollout will technically break the build (the formatting leg) and I'll need to "fix it" by making this counterpart change to the jitutils repo. Based on your suggestion I'm just closing this change because there's no point for making it out of sync with the rollout itself - I don't think the two lines of "cleanup" regarding the "src" folder level merit a separate PR, this can be easily fixed as part of the "real" change in lock-step with the rollout.

@trylek trylek closed this Nov 24, 2020
trylek added a commit to trylek/jitutils that referenced this pull request Dec 7, 2020
As discussed about two weeks back in context of

dotnet#304

this change complements the runtime repo PR

dotnet/runtime#44973

by fixing the correlated code in jitutils dealing with coreclr paths.

Thanks

Tomas
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