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

Move RIT to build against net472 and net6. #906

Closed
wants to merge 5 commits into from

Conversation

JoeRobich
Copy link
Member

This change would set us up to move to a dotnet-tool. I tried to target netstandard1.3 but our dependencies didn't want to cooperate.

Moving from net46 to net472 does necessitate updating insertion pipelines to invoke RIT from the correct folder. This has been completed for Roslyn and Roslyn-SDK. Would need to coordinate with the project-system & the testing teams to make sure no one gets broken.

Copy link
Contributor

@RikkiGibson RikkiGibson left a comment

Choose a reason for hiding this comment

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

Looks fine to me, however, wondering if we can drop the netframework target entirely. Does that make deployment harder than it currently is?

@JoeRobich
Copy link
Member Author

Looks fine to me, however, wondering if we can drop the netframework target entirely. Does that make deployment harder than it currently is?

It is a bigger change, but not necessarily a hard change. Still need to check with @dmonroym and @shyamnamboodiripad that the current change will be low impact enough to get completed.

@shyamnamboodiripad
Copy link
Contributor

Tagging @AbhitejJohn as well. @JoeRobich I don't think it would be too difficult to modify the pipelines for UT insertion as they are based on corresponding roslyn pipelines - but Abhitej should have more context on this.

We may also need to update the oneoffinsertion, updatexistingpr, overwriteexistinpr queues. Joey - will you be fixing those?

@JoeRobich
Copy link
Member Author

JoeRobich commented Mar 9, 2021

We may also need to update the oneoffinsertion, updatexistingpr, overwriteexistinpr queues. Joey - will you be fixing those?

I've already updated those pipelines to handle this change. Basically I update the powershell script task in our pipelines to test for a net472 directory before falling back to the current net46.

See comment below

@RikkiGibson
Copy link
Contributor

Should we attempt to do #854 before merging this change?

@RikkiGibson
Copy link
Contributor

Basically, there is so much copy-pasting in web UIs to configure our pipelines. If we just had a YAML template for "obtain RIT" and "run RIT" tasks, this kind of maintenance could potentially get easier. I don't know for sure if AzDO supports our particular use case with this, though.

@dmonroym
Copy link
Member

dmonroym commented Mar 9, 2021

Seems like we just need to modify the script on the release pipeline? From the project-system side of things it seems low impact and I can test this out once it's ready for us to do so.

@JoeRobich
Copy link
Member Author

Should we attempt to do #854 before merging this change?

I've updated all of Roslyn's insertion pipelines.

@JoeRobich
Copy link
Member Author

Sigh, I goofed when I updated Roslyns insertion pipelines. I shouldn't have changed the working directory. Updated again with the intention of removing the if when this merges.

mv RoslynTools.VisualStudioInsertionTool.* RIT
if (Test-Path .\RIT\tools\net472) {
  .\RIT\tools\net472\OneOffInsertion.ps1 ...
}
else {
  .\RIT\tools\net46\OneOffInsertion.ps1 ...
}

<PackageReference Include="System.IdentityModel.Tokens.Jwt" Version="5.5.0" />
<PackageReference Include="System.IO.Compression.ZipFile" Version="4.3.0" />
<PackageReference Include="System.ValueTuple" Version="4.4.0" />
<PackageReference Include="WindowsAzure.ServiceBus" Version="5.2.0" />
Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks Remove Unused Reference feature!

Copy link
Contributor

Choose a reason for hiding this comment

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

Yeah whoever added that is great

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks @AlekseyTs!

@RikkiGibson
Copy link
Contributor

Hi Joey, how is it going with this PR? Please let me know if there's any way I can assist with it.

@JoeRobich
Copy link
Member Author

Hi Joey, how is it going with this PR?

This PR should be ready to merge. I'm just hesitant to break everyone. =p

@dmonroym
Copy link
Member

Hi Joey, how is it going with this PR?

This PR should be ready to merge. I'm just hesitant to break everyone. =p

@RikkiGibson perhaps we can publish the package with this update elsewhere and dogfood it for a bit before publishing it in dotnet-eng

@RikkiGibson
Copy link
Contributor

Sure, it feels like we could publish to some testing feed and use the "OneOffInsertion - Experimental" pipeline to try out this change.

@RikkiGibson
Copy link
Contributor

I think most people run the tool via the powershell scripts, so I'm optimistic things won't be broken too badly by this change. Maybe we can merge in a week or two?

global.json Outdated Show resolved Hide resolved
global.json Outdated Show resolved Hide resolved
@JoeRobich JoeRobich changed the title Move RIT to build against net472 and net5. Move RIT to build against net472 and net6. Nov 25, 2021
@JoeRobich
Copy link
Member Author

@RikkiGibson Think we should move forward with this? One thought is we could rework this tool with the System.CommandLine api and convert the ps1 scripts to be subcommands of the RIT tool.

@RikkiGibson
Copy link
Contributor

Yeah, let's do this. It seems like this PR is a first step toward what you've described.

@JoeRobich
Copy link
Member Author

Instead of taking this PR (#906) we should move RIT functionality to dotnet-roslyn (#1168) as a set of subcommands which correspond to various scripts create-insertion (OneOffInsertion), create-dummy-insertion (CreateDummyPR), update-insertion, & overwrite-insertion (UpdateExistingPR).

Closing this PR.

@RikkiGibson
Copy link
Contributor

Should we just copy-paste the parts of the implementation we need into a new command under the dotnet-roslyn CLI tool here? I recall having problems trying to share code between this and a dotnet CLI tool project.

@JoeRobich
Copy link
Member Author

We shouldn't try to share code. I would argue that we remove the old RIT implementation when the code is moved. Users of RIT won't be broken by the change but would then need to move to get new functionality.

@RikkiGibson
Copy link
Contributor

RikkiGibson commented Mar 28, 2022

I think I'm fine with removing. It shouldn't be hard for users to move from the old to new tool if they need some fix.

This might be a good opportunity for us to start using semantic versioning of the CLI tool, i.e. bumping the major version when we make breaking changes. Then we'll ensure that our users pull down the tool with the correct kind of version range (i.e. including patch/minor releases, not major releases).

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.

4 participants