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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add Rich Code Navigation Indexing #5790

Merged
merged 9 commits into from Oct 13, 2020
Merged

Conversation

jepetty
Copy link
Contributor

@jepetty jepetty commented Oct 9, 2020

I've altered two files:

  1. Add a Rich Navigation specific build (which will appear as a new build pipeline), indexing on every push to master. This will allow you to use Rich Navigation in Visual Studio to enable cross-repository searches, serverless navigation at https://online.visualstudio.com/github/dotnet/msbuild, and integrated GitHub C# navigation once that is released (or, comment below if you want to be added to the preview now 馃槉).
  2. Added the Rich Navigation task to your normal CI. This has all the same benefits of ^, but also indexes your pull requests for a richer code review experience. This does come at the cost of increasing the time of your CI.

Based on your team's preference, only one of these changes is necessary.

Rich Code Navigation

Docs Link
With Rich Code Navigation, you can use editor-level navigation capabilities (like peek definition, find all references, and even diagnostics) on a pull request, without requiring a local checkout. This is available across all files and dependencies of your repository.

Rich Code Navigation is available for Visual Studio (for repos hosted on GitHub or Azure Repos) and Visual Studio Code (for repos hosted on GitHub).

Rich Code Navigation supports these capabilities:

  • Hover
  • Peek definition and Go to definition
  • Peek references and Find all references
  • Go to type definition
  • Go to implementation
  • Diagnostics

@jepetty
Copy link
Contributor Author

jepetty commented Oct 9, 2020

FYI adding to the main CI as opposed to a separate pipeline will add 15 minutes to your total CI time

@marcpopMSFT
Copy link
Member

@rainersigwald concerns with the added build time?

Copy link
Member

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

It looks like it ran but only took a few minutes? And it didn't run as a separate pipeline? Where did the 15 minutes come from?

Rich code navigation looks cool! Looking forward to trying it out in a future PR!

@@ -58,6 +58,11 @@ jobs:
inputs:
filename: 'eng/cibuild_bootstrapped_msbuild.cmd'
arguments: '-msbuildEngine dotnet'
- task: RichCodeNavIndexer@0
Copy link
Member

@Forgind Forgind Oct 12, 2020

Choose a reason for hiding this comment

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

Was it intentional to only add this to the Core on Windows build? (As opposed to any of the others)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Honestly, mostly just picked a build :) We have a requirement to run on Windows, but otherwise no reason to do "Windows Core" over "Windows Full"

displayName: RichCodeNav Upload
inputs:
languages: 'csharp'
continueOnError: true
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 need to add a condition?

@@ -0,0 +1,21 @@
trigger:
- master
Copy link
Member

Choose a reason for hiding this comment

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

Might want to also trigger for exp/* and vs*

- master

jobs:
- job: BootstrapMSBuildOnFullFrameworkWindows
Copy link
Member

Choose a reason for hiding this comment

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

Should this name reference rich navigation? And not bootstrap?

displayName: build
inputs:
filePath: eng/common/build.ps1
arguments: '-restore -build -ci /p:CreateBootstrap=false /nr:false'
Copy link
Member

Choose a reason for hiding this comment

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

Suggested change
arguments: '-restore -build -ci /p:CreateBootstrap=false /nr:false'
arguments: '-restore -build -ci /nr:false'

(It's the default.)

@jepetty
Copy link
Contributor Author

jepetty commented Oct 12, 2020

@Forgind ahh thanks you're right, it only adds 5 minutes to your build time (apologies - I'm adding to a bunch of dotnet repos at once and get confused very easily 馃樀).

Yeah, for now I've added both a new pipeline AND added it as a step to the existing CI. I'll only merge with one of those options remaining depending on if y'all are willing to add 5 minutes to your build for PR support or would rather keep your PR builds faster 馃槃

Copy link
Member

@Forgind Forgind left a comment

Choose a reason for hiding this comment

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

Looks good to me! What's the advantage of the add-5-minutes version?

Copy link
Member

@rainersigwald rainersigwald left a comment

Choose a reason for hiding this comment

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

My inclination is to have faster builds. Fortunately, one of our Windows legs (full/release/no bootstrap) is pretty reliably >5 minutes faster than some of the others, so we can have our cake and eat it too! I moved to that one and deleted the standalone definition.

Thanks, @jepetty!

@jepetty
Copy link
Contributor Author

jepetty commented Oct 13, 2020

Awesome, thanks for the reviews and help! @Forgind the bonus to adding 5 minutes to each build is that you'll have the option of having rich pull request reviews. For now, this rich code review experience is supported in VS Code, but we're actively looking at enabling it in other clients

@jepetty
Copy link
Contributor Author

jepetty commented Oct 13, 2020

@rainersigwald or @Forgind it looks like I don't actually have the permission to merge this PR 馃槃

@benvillalobos
Copy link
Member

LGTM so I'm losing the loop on this, thanks @jepetty!

@benvillalobos benvillalobos merged commit 0d9652e into dotnet:master Oct 13, 2020
@jepetty
Copy link
Contributor Author

jepetty commented Oct 13, 2020

Thanks, Ben! 馃槂

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.

None yet

5 participants