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

Avoid spurious errors in Q# git diffs #1754

Merged
merged 1 commit into from
Jul 19, 2024

Conversation

swernli
Copy link
Collaborator

@swernli swernli commented Jul 19, 2024

This change updates the logic in isQsharpDocument to make sure the language service doesn't generate spurious errors from treating the left-hand side of the diff as a Q# file.

This change updates the logic in `isQsharpDocument` to make sure the language service doesn't generate spurious errors from treating the left-hand side of the diff as a Q# file.
Copy link

Benchmark for 82e61ce

Click to view benchmark
Test Base PR %
Array append evaluation 331.7±1.70µs 333.4±2.13µs +0.51%
Array literal evaluation 168.7±2.58µs 171.7±1.04µs +1.78%
Array update evaluation 406.5±1.98µs 408.2±4.80µs +0.42%
Core + Standard library compilation 21.2±0.06ms 21.2±0.08ms 0.00%
Deutsch-Jozsa evaluation 4.8±0.06ms 4.8±0.05ms 0.00%
Large file parity evaluation 34.3±0.27ms 34.3±0.32ms 0.00%
Large input file compilation 12.3±0.09ms 12.4±0.10ms +0.81%
Large input file compilation (interpreter) 48.5±1.35ms 48.6±1.15ms +0.21%
Large nested iteration 31.9±0.25ms 32.3±1.30ms +1.25%
Perform Runtime Capabilities Analysis (RCA) on Deutsch-Jozsa sample 1553.0±26.93µs 1575.2±52.08µs +1.43%
Perform Runtime Capabilities Analysis (RCA) on large file sample 7.7±0.07ms 7.7±0.06ms 0.00%
Perform Runtime Capabilities Analysis (RCA) on teleport sample 1414.9±42.30µs 1437.0±56.41µs +1.56%
Perform Runtime Capabilities Analysis (RCA) on the core and std libraries 27.7±0.17ms 27.8±0.54ms +0.36%
Teleport evaluation 89.7±3.53µs 90.6±6.61µs +1.00%

@swernli swernli added this pull request to the merge queue Jul 19, 2024
Merged via the queue into main with commit 38774c5 Jul 19, 2024
19 checks passed
@swernli swernli deleted the swernli/fix-spurious-errors-on-diffs branch July 19, 2024 22:39
swernli added a commit that referenced this pull request Aug 21, 2024
Much like git diffs with scheme `git`, viewing files surfaced from GitHub Pull Requests that come from a branch not currently checked out produces spurious errors since they are not real files on disk and have extra data in their filenames. This uses the same strategy as in #1754 to avoid them by not loading things with the custom `pr` URI scheme.
github-merge-queue bot pushed a commit that referenced this pull request Aug 21, 2024
Much like git diffs with scheme `git`, viewing files surfaced from
GitHub Pull Requests that come from a branch not currently checked out
produces spurious errors since they are not real files on disk and have
extra data in their filenames. This uses the same strategy as in #1754
to avoid them by not loading things with the custom `pr` URI scheme.
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