Skip to content
This repository was 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
mctavish merged 11 commits into
googleapis:masterfrom
Louis-Ye:nodejs-agent-srcmap
Jun 24, 2021
Merged

fix: source mapping original path instead of user-provided input#978
mctavish merged 11 commits into
googleapis:masterfrom
Louis-Ye:nodejs-agent-srcmap

Conversation

@Louis-Ye
Copy link
Copy Markdown

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 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
Copy Markdown

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
Copy Markdown
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
Copy Markdown
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?

Comment thread src/agent/io/sourcemapper.ts Outdated
Comment thread test/test-sourcemapper.ts
Copy link
Copy Markdown
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
Copy Markdown
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.

Comment thread src/agent/io/sourcemapper.ts Outdated
@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