Skip to content
This repository has been archived by the owner on Apr 3, 2024. It is now read-only.

fix: source mapping original path instead of user-provided input #978

Merged
merged 11 commits into from
Jun 24, 2021

Conversation

Louis-Ye
Copy link
Contributor

Uses the original source path in the mapInfo instead of user-provided input to check the generated sources, so that when the user provided a partial match of the file, we can still correctly map the original file to the generated file.

This PR is based on PR #977

Fixes #963

@Louis-Ye Louis-Ye requested review from a team as code owners June 16, 2021 21:47
@google-cla google-cla bot added the cla: yes This human has signed the Contributor License Agreement. label Jun 16, 2021
@product-auto-label product-auto-label bot added the api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. label Jun 16, 2021
@codecov
Copy link

codecov bot commented Jun 16, 2021

Codecov Report

Merging #978 (b917936) into master (b647106) will not change coverage.
The diff coverage is 100.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #978   +/-   ##
=======================================
  Coverage   66.78%   66.78%           
=======================================
  Files          20       20           
  Lines        1668     1668           
  Branches      340      340           
=======================================
  Hits         1114     1114           
  Misses        475      475           
  Partials       79       79           
Impacted Files Coverage Δ
src/agent/v8/inspector-debugapi.ts 84.95% <ø> (ø)
src/agent/v8/legacy-debugapi.ts 0.00% <ø> (ø)
src/agent/io/sourcemapper.ts 87.91% <100.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update b647106...b917936. Read the comment docs.

* @constructor
*/
constructor() {
constructor(readonly logger: Logger) {
Copy link
Contributor

Choose a reason for hiding this comment

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

Private constructor?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

The create() function is actually not a static function of this class, marking the constructor as private will change the usage of this function in all places. I think for this PR, it is better to keep it as it is, what do you think?

src/agent/io/sourcemapper.ts Outdated Show resolved Hide resolved
test/test-sourcemapper.ts Show resolved Hide resolved
Copy link
Contributor

@JustinBeckwith JustinBeckwith left a comment

Choose a reason for hiding this comment

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

LGTM from a TypeScript perspective

Copy link
Contributor

@mctavish mctavish left a comment

Choose a reason for hiding this comment

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

One small change to make, but looks good.

src/agent/io/sourcemapper.ts Outdated Show resolved Hide resolved
@mctavish mctavish added the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 24, 2021
@gcf-owl-bot gcf-owl-bot bot removed the owlbot:run Add this label to trigger the Owlbot post processor. label Jun 24, 2021
@mctavish mctavish merged commit 108225c into googleapis:master Jun 24, 2021
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
api: clouddebugger Issues related to the googleapis/cloud-debug-nodejs API. cla: yes This human has signed the Contributor License Agreement.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Breakpoint is set to a wrong line when the user-provided breakpoint path is a partial path
3 participants