Generate JS sourcemaps with --debug#3381
Closed
verhovsky wants to merge 1 commit intotree-sitter:masterfrom
Closed
Generate JS sourcemaps with --debug#3381verhovsky wants to merge 1 commit intotree-sitter:masterfrom
verhovsky wants to merge 1 commit intotree-sitter:masterfrom
Conversation
Jacobj123h
approved these changes
Jun 8, 2024
verhovsky
commented
Jul 29, 2024
| mv target/scratch/tree-sitter.wasm ${WEB_DIR}/tree-sitter.wasm | ||
| if [[ $debug == 1 ]]; then | ||
| mv target/scratch/tree-sitter.wasm.map ${WEB_DIR}/tree-sitter.wasm.map | ||
| # TODO: copy the source files |
Contributor
Author
There was a problem hiding this comment.
We can check which source files the source map needs using this command
jq -r '.sources[]' lib/binding_web/tree-sitter.wasm.mapWith my compiler on M1 macOS, it expects these
../../lib/src/alloc.c
../../lib/src/get_changed_ranges.c
../../lib/src/length.h
../../lib/src/array.h
../../lib/src/subtree.h
../../lib/src/language.c
../../lib/src/wasm_store.c
../../lib/src/language.h
../../lib/src/lexer.c
../../lib/src/unicode.h
../../lib/src/node.c
../../lib/src/point.h
../../lib/src/subtree.c
../../lib/src/tree.c
../../lib/src/parser.c
../../lib/src/stack.c
../../lib/src/reusable_node.h
../../lib/src/clock.h
../../lib/src/atomic.h
../../lib/src/query.c
../../lib/src/tree_cursor.c
../../lib/src/reduce_action.h
../../lib/src/tree_cursor.h
../../lib/binding_web/binding.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/errno/__errno_location.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/__stdio_close.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/__stdio_seek.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/__stdio_write.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/exit/abort.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/emscripten_memcpy.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/memmove.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/memset.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/emscripten_time.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/__lockfile.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/fflush.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/__towrite.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/__overflow.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/fputc.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/putc.h
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/cache/sysroot/include/atomic_arch.h
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/internal/pthread_impl.h
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/fputs.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/fwrite.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/isprint.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswalnum.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswalpha.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswspace.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/pthread/library_pthread_stub.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/unistd/lseek.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/memcmp.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/ofl.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/emscripten_syscall_stubs.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/unistd/getpid.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/pthread/pthread_self_stub.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/snprintf.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/strlen.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/strncmp.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/memchr.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/strnlen.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/math/frexp.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/vfprintf.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/include/math.h
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/stdio/vsnprintf.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/wasi-helpers.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/wcschr.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/wcslen.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/multibyte/wcrtomb.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/multibyte/wctomb.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/emscripten_get_heap_size.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/sbrk.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/dlmalloc.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/lib/builtins/ashlti3.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/lib/builtins/lshrti3.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/lib/builtins/trunctfdf2.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/lib/builtins/fp_trunc.h
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/lib/builtins/fp_trunc_impl.inc
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/towctrans.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswdigit.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/stack_ops.S
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/stack_limits.S
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswlower.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/isblank.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswblank.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/strncat.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/emscripten_tempret.s
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswupper.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/stpncpy.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/strncpy.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/ctype/iswxdigit.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/libc/musl/src/string/strcmp.c
../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/emscripten_exception_builtins.c
I don't understand how we can ship an npm package with a file like ../../../../../../../opt/homebrew/Cellar/emscripten/3.1.61/libexec/system/lib/compiler-rt/emscripten_exception_builtins.c, those ../ put the file outside the npm package's directory.
Member
|
Closing as stale (been almost a year) |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Follow up to #3380, works on #3379