GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — lib: don't parse windows drive letters as schemes by PaperStrike · Pull Request #50580 · nodejs/node

Conversation

@PaperStrike

@PaperStrike PaperStrike commented Nov 6, 2023

Copy link
Copy Markdown
Contributor

The windows drive letters are incorrectly parsed as schemes, which pollutes the source map cache with malformed file paths.

Fixes: #50523

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bricss and meyfa reacted with thumbs up emoji
All reactions
  • 👍 2 reactions
@PaperStrike
lib: don't parse windows drive letters as schemes
64365ad
We were incorrectly parsing windows drive letters as schemes. This was
polluting the source map cache with malformed file paths.

Fixes: nodejs#50523
@nodejs-github-bot nodejs-github-bot added the needs-ci PRs that need a full CI run. label Nov 6, 2023
@PaperStrike

PaperStrike commented Nov 15, 2023

Copy link
Copy Markdown
Contributor Author

@bcoe @cspotcode Any thoughts? Thanks in advance.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

bcoe
bcoe reviewed Nov 21, 2023
View reviewed changes

@bcoe bcoe left a comment

Copy link
Copy Markdown
Contributor

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.

This looks like a reasonable fix to me. I'm not a maintainer but giving my 👍

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

PaperStrike reacted with heart emoji
All reactions
  • ❤️ 1 reaction
@PaperStrike

PaperStrike commented Nov 24, 2023

Copy link
Copy Markdown
Contributor Author

Hello, is anyone paying attention to this small fix? I am expecting this to be merged and backported to 18.x as soon as possible. Thank you guys.

Pinging some members with source-map-cache review experience. Hope this doesn't bothers much.
@anonrig @legendecas @joyeecheung

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

tniessen
tniessen reviewed Nov 24, 2023
View reviewed changes
Comment thread test/parallel/test-source-map-enable.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

Comment thread test/fixtures/source-map/ts-node-win32.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@legendecas

legendecas commented Nov 24, 2023

Copy link
Copy Markdown
Member

This looks like a trivial fix but I think it would be better to raise the issue to https://github.com/tc39/source-map-rfc as well.

PaperStrike reacted with eyes emoji
All reactions
  • 👀 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas reviewed Nov 24, 2023
View reviewed changes
Comment thread lib/internal/source_map/source_map_cache.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@legendecas legendecas added the source maps Issues and PRs related to source map support. label Nov 24, 2023
@PaperStrike
lib: typo fixes
3daf3b8
legendecas
legendecas reviewed Nov 29, 2023
View reviewed changes

@legendecas legendecas left a comment

Copy link
Copy Markdown
Member

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.

LGTM with the comment change

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

All reactions
Comment thread lib/internal/source_map/source_map_cache.js Resolved

Uh oh!

There was an error while loading. Please reload this page.

@PaperStrike @legendecas
lib: update sourcesToAbsolute comment
f41d758
Co-authored-by: Chengzhong Wu <[email protected]>
@legendecas legendecas added the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 3, 2023
@github-actions github-actions Bot removed the request-ci Add this label to start a Jenkins CI on a PR. Only starts once the PR has an approving review. label Dec 3, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 3, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/56059/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@PaperStrike

PaperStrike commented Dec 4, 2023

Copy link
Copy Markdown
Contributor Author

The failure doesn't seem related to this PR. sequential.test-watch-mode-inspect was marked flaky.

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

legendecas
legendecas approved these changes Dec 5, 2023
View reviewed changes
@nodejs-github-bot

nodejs-github-bot commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator

CI: https://ci.nodejs.org/job/node-test-pull-request/56095/

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas legendecas added author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 5, 2023
@legendecas

legendecas commented Dec 5, 2023

Copy link
Copy Markdown
Member

Thank you for your contribution!

PaperStrike reacted with heart emoji
All reactions
  • ❤️ 1 reaction

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@nodejs-github-bot nodejs-github-bot added commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. and removed commit-queue PRs queued for automated landing through the Commit Queue. labels Dec 5, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator
Commit Queue failed
- Loading data for nodejs/node/pull/50580
✔  Done loading data for nodejs/node/pull/50580
----------------------------------- PR info ------------------------------------
Title      lib: don't parse windows drive letters as schemes (#50580)
Author     华  (@PaperStrike, first-time contributor)
Branch     PaperStrike:abs-win-path-sources -> nodejs:main
Labels     author ready, needs-ci, source maps
Commits    3
 - lib: don't parse windows drive letters as schemes
 - lib: typo fixes
 - lib: update sourcesToAbsolute comment
Committers 1
 - 华 
PR-URL: https://github.com/nodejs/node/pull/50580
Fixes: https://github.com/nodejs/node/issues/50523
Reviewed-By: Chengzhong Wu 
------------------------------ Generated metadata ------------------------------
PR-URL: https://github.com/nodejs/node/pull/50580
Fixes: https://github.com/nodejs/node/issues/50523
Reviewed-By: Chengzhong Wu 
--------------------------------------------------------------------------------
   ℹ  This PR was created on Mon, 06 Nov 2023 15:38:17 GMT
   ✔  Approvals: 1
   ✔  - Chengzhong Wu (@legendecas) (TSC): https://github.com/nodejs/node/pull/50580#pullrequestreview-1764032021
   ✔  Last GitHub CI successful
   ℹ  Last Full PR CI on 2023-12-05T06:11:16Z: https://ci.nodejs.org/job/node-test-pull-request/56095/
- Querying data for job/node-test-pull-request/56095/
   ✔  Last Jenkins CI successful
--------------------------------------------------------------------------------
   ✔  No git cherry-pick in progress
   ✔  No git am in progress
   ✔  No git rebase in progress
--------------------------------------------------------------------------------
- Bringing origin/main up to date...
From https://github.com/nodejs/node
 * branch                  main       -> FETCH_HEAD
✔  origin/main is now up-to-date
- Downloading patch for 50580
From https://github.com/nodejs/node
 * branch                  refs/pull/50580/merge -> FETCH_HEAD
✔  Fetched commits as 9def0a9f94f0..f41d75815fa4
--------------------------------------------------------------------------------
Auto-merging lib/internal/source_map/source_map_cache.js
[main 6a092ac015] lib: don't parse windows drive letters as schemes
 Author: 华 
 Date: Mon Nov 6 12:22:41 2023 +0000
 4 files changed, 49 insertions(+)
 create mode 100644 test/fixtures/source-map/ts-node-win32.js
 create mode 100644 test/fixtures/source-map/ts-node.ts
[main 0bbf0ed739] lib: typo fixes
 Author: 华 
 Date: Sat Nov 25 10:40:29 2023 +0000
 3 files changed, 4 insertions(+), 4 deletions(-)
Auto-merging lib/internal/source_map/source_map_cache.js
[main 6865310b7c] lib: update sourcesToAbsolute comment
 Author: 华 
 Date: Wed Nov 29 17:09:19 2023 +0000
 1 file changed, 1 insertion(+)
   ✔  Patches applied
There are 3 commits in the PR. Attempting autorebase.
Rebasing (2/6)

Executing: git node land --amend --yes
⚠ Found Fixes: #50523, skipping..
--------------------------------- New Message ----------------------------------
lib: don't parse windows drive letters as schemes

We were incorrectly parsing windows drive letters as schemes. This was
polluting the source map cache with malformed file paths.

Fixes: #50523
PR-URL: #50580
Reviewed-By: Chengzhong Wu [email protected]

[detached HEAD 0cb57c3f82] lib: don't parse windows drive letters as schemes
Author: 华 [email protected]
Date: Mon Nov 6 12:22:41 2023 +0000
4 files changed, 49 insertions(+)
create mode 100644 test/fixtures/source-map/ts-node-win32.js
create mode 100644 test/fixtures/source-map/ts-node.ts
Rebasing (3/6)
Rebasing (4/6)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
lib: typo fixes

PR-URL: #50580
Fixes: #50523
Reviewed-By: Chengzhong Wu [email protected]

[detached HEAD 534d96cdaf] lib: typo fixes
Author: 华 [email protected]
Date: Sat Nov 25 10:40:29 2023 +0000
3 files changed, 4 insertions(+), 4 deletions(-)
Rebasing (5/6)
Rebasing (6/6)

Executing: git node land --amend --yes
--------------------------------- New Message ----------------------------------
lib: update sourcesToAbsolute comment

Co-authored-by: Chengzhong Wu [email protected]
PR-URL: #50580
Fixes: #50523
Reviewed-By: Chengzhong Wu [email protected]

[detached HEAD 31bd026db9] lib: update sourcesToAbsolute comment
Author: 华 [email protected]
Date: Wed Nov 29 17:09:19 2023 +0000
1 file changed, 1 insertion(+)

Successfully rebased and updated refs/heads/main.

ℹ Add commit-queue-squash label to land the PR as one commit, or commit-queue-rebase to land as separate commits.

https://github.com/nodejs/node/actions/runs/7097155769

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

@legendecas legendecas added commit-queue-squash PRs the Commit Queue should land as one squashed commit. commit-queue PRs queued for automated landing through the Commit Queue. and removed commit-queue-failed PRs whose Commit Queue landing failed and need manual intervention before retrying. labels Dec 5, 2023
@nodejs-github-bot nodejs-github-bot removed the commit-queue PRs queued for automated landing through the Commit Queue. label Dec 5, 2023
@nodejs-github-bot
nodejs-github-bot merged commit 77e3dfc into nodejs:main Dec 5, 2023
@nodejs-github-bot

nodejs-github-bot commented Dec 5, 2023

Copy link
Copy Markdown
Collaborator

Landed in 77e3dfc

All reactions

Sorry, something went wrong.

Uh oh!

There was an error while loading. Please reload this page.

RafaelGSS pushed a commit that referenced this pull request Dec 15, 2023
@PaperStrike @RafaelGSS
lib: don't parse windows drive letters as schemes
7a8a2d5
We were incorrectly parsing windows drive letters as schemes. This was
polluting the source map cache with malformed file paths.

Fixes: #50523
PR-URL: #50580
Reviewed-By: Chengzhong Wu <[email protected]>
@RafaelGSS RafaelGSS mentioned this pull request Dec 15, 2023
v21.5.0 proposal #51166
Merged
richardlau pushed a commit that referenced this pull request Mar 25, 2024
@PaperStrike @richardlau
lib: don't parse windows drive letters as schemes
5c7a9c8
We were incorrectly parsing windows drive letters as schemes. This was
polluting the source map cache with malformed file paths.

Fixes: #50523
PR-URL: #50580
Reviewed-By: Chengzhong Wu <[email protected]>
@richardlau richardlau mentioned this pull request Mar 25, 2024
v20.12.0 proposal #52212
Merged
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Reviewers

@tniessen tniessen tniessen left review comments
@legendecas legendecas legendecas approved these changes
+1 more reviewer
@bcoe bcoe bcoe left review comments
Reviewers whose approvals may not affect merge requirements

Uh oh!

There was an error while loading. Please reload this page.

Assignees

No one assigned

Labels

author ready PRs with CI started, the required approvals, and no outstanding review comments. commit-queue-squash PRs the Commit Queue should land as one squashed commit. needs-ci PRs that need a full CI run. source maps Issues and PRs related to source map support.

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

Absolute windows paths are not parsed correctly when generating source map cache

Uh oh!

There was an error while loading. Please reload this page.

5 participants

@PaperStrike @legendecas @nodejs-github-bot @bcoe @tniessen
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
You are visitor 01402503 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.