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

fix: wrong line number in stack trace #1377

Merged
merged 2 commits into from
Oct 16, 2024

Conversation

ANGkeith
Copy link
Collaborator

@ANGkeith ANGkeith commented Oct 14, 2024

npm uninstall ts-node source-map-support @types/source-map-support
npm install --save-dev tsx

Issue

Using the following

# .gitlab-ci.yaml
---
job:
  image: test-err
  script:
    - echo 1

image
The stack trace returns the wrong line number.

which is possibly related to https://www.github.com/TypeStrong/ts-node/issues/2053, thus replacing ts-node with tsx

@ANGkeith ANGkeith force-pushed the fix/wrong-line-number-in-stack-trace branch from 1334fd6 to 3f2f046 Compare October 14, 2024 06:39
@ANGkeith ANGkeith added the tiny label Oct 14, 2024
@ANGkeith ANGkeith force-pushed the fix/wrong-line-number-in-stack-trace branch from 3f2f046 to 104357d Compare October 14, 2024 09:33
@firecow
Copy link
Owner

firecow commented Oct 15, 2024

merge with master please @ANGkeith

@ANGkeith ANGkeith force-pushed the fix/wrong-line-number-in-stack-trace branch from 104357d to 84f7a78 Compare October 15, 2024 08:46
@firecow
Copy link
Owner

firecow commented Oct 15, 2024

@ANGkeith We need to ensure that stack traces in the pkg binaries still works, when you remove the sourcemap package.

@ANGkeith
Copy link
Collaborator Author

opps, forgot about that..

but do we really need sourcemap for the binary ?

i thought sourcemap is more for dev/debugging

@ANGkeith ANGkeith force-pushed the fix/wrong-line-number-in-stack-trace branch from b0574a3 to 42219d6 Compare October 15, 2024 17:12
npm uninstall ts-node source-map-support @types/source-map-support
npm install --save-dev tsx
@ANGkeith ANGkeith force-pushed the fix/wrong-line-number-in-stack-trace branch from 42219d6 to 310673a Compare October 15, 2024 17:17
@ANGkeith
Copy link
Collaborator Author

anyways,

@ANGkeith We need to ensure that stack traces in the pkg binaries still works, when you remove the sourcemap package.

should be fixed already

Copy link

@firecow
Copy link
Owner

firecow commented Oct 16, 2024

@ANGkeith We don't have any security concerns going on in this tool, so I can't think of a reason why we would want to exclude such epic piece of debug information, when users make bug reports.

@firecow firecow merged commit b3434b5 into master Oct 16, 2024
10 checks passed
@firecow firecow deleted the fix/wrong-line-number-in-stack-trace branch October 16, 2024 05:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants