-
Notifications
You must be signed in to change notification settings - Fork 8.4k
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
Add support for rich code navigation in GitHub #12855
Conversation
@@ -11,6 +11,7 @@ jobs: | |||
BuildConfiguration: ${{ parameters.configuration }} | |||
BuildPlatform: ${{ parameters.platform }} | |||
WindowsTerminalBranding: ${{ parameters.branding }} | |||
EnableRichCodeNavigation: true |
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 don't see anything using this variable.
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.
apparently it's magic to turn it on in the code nav tooling itself.
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.
Yes, we use this parameter to tell us to run a specific package called RichCodeNav.EnvVarDump, which is needed for some builds so we can get information about the environment the build is running in.
jobs: | ||
- job: CodeNavIndexer | ||
displayName: Run Github CodeNav Indexer | ||
pool: { vmImage: windows-2019 } |
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.
Does it have to run on Windows? Windows is much slower than Linux at starting up here.
I mean it's fine, but just curious.
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.
Unfortunately right now we do have to run on Windows, but we're working on Linux support! We'll send out a mail once we have that ready so you can switch over!
- stage: CodeIndexer | ||
displayName: Github CodeNav Indexer | ||
dependsOn: [Build_x64] | ||
condition: succeeded() | ||
jobs: | ||
- template: ./templates/codenav-indexer.yml |
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.
Oof. Doesn't this mean it's going to run on every push and every rolling build? Won't that end up taking a massive amount of storage space for all those indexes to be saved? I would think we would run it only on main
or something.
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.
That is a good question. Lemme bring in the codenav folks to see what they think
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.
Hi! Holly from the codenav team here! We're fine with this running with such high frequency and the storage load, we actually want to test how well we scale to highly active repos. I will say, most folks who onboard do only run our task on builds of main and a few teams have made a separate .yml file just for the build+codenav tasks so that they can have more fine-tuned control of when it runs, but it's up to you what builds you would find benefit from having navigation on.
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.
My bigger concern is that this will build against 3p code on pull requests. We might want to restrict it like we did the ARM64 build 😄
- stage: CodeIndexer | ||
displayName: Github CodeNav Indexer | ||
dependsOn: [Build_x64] | ||
condition: succeeded() | ||
jobs: | ||
- template: ./templates/codenav-indexer.yml |
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.
My bigger concern is that this will build against 3p code on pull requests. We might want to restrict it like we did the ARM64 build 😄
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.
b o o m
Hello @DHowett! Because this pull request has the p.s. you can customize the way I help with merging this pull request, such as holding this pull request until a specific person approves. Simply @mention me (
|
This is exactly the same as #12855, save for one small difference: ```diff diff --git a/build/pipelines/ci.yml b/build/pipelines/ci.yml index e4e53e9b2..dc9040aeb 100644 --- a/build/pipelines/ci.yml +++ b/build/pipelines/ci.yml @@ -99,7 +99,6 @@ stages: - stage: CodeIndexer displayName: Github CodeNav Indexer dependsOn: [Build_x64] - condition: succeeded() + condition: and(succeeded(), not(eq(variables['Build.Reason'], 'PullRequest'))) jobs: - template: ./templates/codenav-indexer.yml - condition: not(eq(variables['Build.Reason'], 'PullRequest')) ``` Because the first ones failed with an error about a duplicate condition And that hosed the whole CI
🎉 Handy links: |
We discussed this with the GitHub folks. It's pretty cool.
(Rich code nav) brings editor-level navigation capabilities into
GitHub.com for C++ and C# repos
If you want to try it out, you can go here: GitHub web
editor
The link is already on the correct branch. If you haven't used
github.dev before there are two steps to get setup:
search for "rich", there'll be a checkbox to enable it.
bar at the bottom. Click on that and select "Latest Index". Then one
more refresh and you should be good to go with navigation in both C#
and C++ files!