Closed Bug 1951341 Opened 15 days ago Closed 14 days ago

Add support for scripts with import attributes

Categories

(DevTools :: Debugger, defect)

defect

Tracking

(firefox138 fixed)

RESOLVED FIXED
138 Branch
Tracking Status
firefox138 --- fixed

People

(Reporter: nchevobbe, Assigned: nchevobbe)

References

(Blocks 1 open bug)

Details

Attachments

(1 file)

Steps to reproduce

  1. In about: config, set javascript.options.experimental.import_attributes to true
  2. Open https://ffx-devtools-import-attributes.glitch.me/
  3. Open the debugger
  4. Open script.js
  5. Select the Outline panel

Expected results

The init function is listed

Actual results

The outline panel is empty


Not that we're currently moving away from Babel for the computation of the data of the outline panel (see Bug 1943949), so this could be fixed automatically

WIP patch for Bug 1943949 does fix the issue, but we might have other problems. For example, we don't get an inline preview

Summary: Outline panel isn't populated on scripts with import attributes → Add support for scripts with import attributes

We need to add the @babel/plugin-syntax-import-attributes plugin to make sure
the outline panel and inline previews are working when using import attributes.

Assignee: nobody → nchevobbe
Status: NEW → ASSIGNED
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/2a5e9bdc7e8e [devtools] Add Debugger support for scripts using import attributes. r=devtools-reviewers,ochameau.

Backed out for causing build bustages

Backout link: https://hg.mozilla.org/integration/autoland/rev/c30fc822188ca5953c31a85733a53278491a2cdc

Push with failures

Failure log

package-tests> gmake[2]: Entering directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:21.551Z] 12:55:21     INFO -  package-tests> /builds/worker/.mozbuild/srcdirs/gecko-8a5b87fe5d69/_virtualenvs/build/bin/python -m mozbuild.action.process_install_manifest --track install__test_files.track _tests _build_manifests/install/_test_files
[task 2025-03-03T12:55:21.551Z] 12:55:21     INFO -  package-tests> error: Symlink target path does not exist: /builds/worker/checkouts/gecko/devtools/client/debugger/test/mochitest/data.json
[task 2025-03-03T12:55:21.551Z] 12:55:21    ERROR -  package-tests> Traceback (most recent call last):
[task 2025-03-03T12:55:21.552Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/fetches/python/lib/python3.8/runpy.py", line 194, in _run_module_as_main
[task 2025-03-03T12:55:21.552Z] 12:55:21     INFO -  package-tests>     return _run_code(code, main_globals, None,
[task 2025-03-03T12:55:21.552Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/fetches/python/lib/python3.8/runpy.py", line 87, in _run_code
[task 2025-03-03T12:55:21.552Z] 12:55:21     INFO -  package-tests>     exec(code, run_globals)
[task 2025-03-03T12:55:21.553Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/action/process_install_manifest.py", line 130, in <module>
[task 2025-03-03T12:55:21.553Z] 12:55:21     INFO -  package-tests>     main(sys.argv[1:])
[task 2025-03-03T12:55:21.553Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/action/process_install_manifest.py", line 100, in main
[task 2025-03-03T12:55:21.553Z] 12:55:21     INFO -  package-tests>     result = process_manifest(
[task 2025-03-03T12:55:21.554Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/checkouts/gecko/python/mozbuild/mozbuild/action/process_install_manifest.py", line 57, in process_manifest
[task 2025-03-03T12:55:21.554Z] 12:55:21     INFO -  package-tests>     result = copier.copy(
[task 2025-03-03T12:55:21.554Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/fetches/python/lib/python3.8/contextlib.py", line 120, in __exit__
[task 2025-03-03T12:55:21.554Z] 12:55:21     INFO -  package-tests>     next(self.gen)
[task 2025-03-03T12:55:21.554Z] 12:55:21     INFO -  package-tests>   File "/builds/worker/checkouts/gecko/python/mozbuild/mozpack/errors.py", line 143, in accumulate
[task 2025-03-03T12:55:21.555Z] 12:55:21     INFO -  package-tests>     raise AccumulatedErrors()
[task 2025-03-03T12:55:21.555Z] 12:55:21     INFO -  package-tests> mozpack.errors.AccumulatedErrors
[task 2025-03-03T12:55:21.555Z] 12:55:21    ERROR -  package-tests> gmake[2]: *** [Makefile:110: install-test-files] Error 1
[task 2025-03-03T12:55:21.555Z] 12:55:21     INFO -  package-tests> gmake[2]: Leaving directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:23.032Z] 12:55:23     INFO -  package-generated-sources> gmake[2]: Entering directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:23.033Z] 12:55:23     INFO -  package-generated-sources> /builds/worker/.mozbuild/srcdirs/gecko-8a5b87fe5d69/_virtualenvs/build/bin/python -m mozbuild.action.package_generated_sources 'dist/target.generated-files.tar.gz'
[task 2025-03-03T12:55:23.033Z] 12:55:23     INFO -  package-generated-sources> gmake[2]: Leaving directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:23.033Z] 12:55:23     INFO -  package-generated-sources> gmake[2]: Entering directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:23.033Z] 12:55:23     INFO -  package-generated-sources> gmake[2]: Leaving directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:23.041Z] 12:55:23     INFO -  gmake[1]: Entering directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:23.042Z] 12:55:23     INFO -  gmake[1]: Leaving directory '/builds/worker/workspace/obj-build'
[task 2025-03-03T12:55:25.859Z] 12:55:25     INFO -  package> gmake[5]: Entering directory '/builds/worker/workspace/obj-build/browser/installer'
[task 2025-03-03T12:55:25.860Z] 12:55:25     INFO -  package> NO_PKG_FILES="core bsdecho js js-config jscpucfg nsinstall viewer TestGtkEmbed elf-dynstr-gc mangle* maptsv* mfc* msdump* msmap* nm2tsv* nsinstall* res/samples res/throbber shlibsign* certutil* pk12util* BadCertAndPinningServer* DelegatedCredentialsServer* EncryptedClientHelloServer* FaultyServer* OCSPStaplingServer* SanctionsTestServer* GenerateOCSPResponse* chrome/chrome.rdf chrome/app-chrome.manifest chrome/overlayinfo components/compreg.dat components/xpti.dat content_unit_tests necko_unit_tests *.dSYM  SmokeDMD" \
[task 2025-03-03T12:55:25.868Z] 12:55:25     INFO -  package> /builds/worker/.mozbuild/srcdirs/gecko-8a5b87fe5d69/_virtualenvs/build/bin/python /builds/worker/checkouts/gecko/toolkit/mozapps/installer/packager.py -DPKG_LOCALE_MANIFEST=/builds/worker/workspace/obj-build/browser/installer/locale-manifest.in -DMOZ_APP_NAME=firefox -DPREF_DIR=defaults/preferences -DMOZ_APP_DISPLAYNAME="Firefox Nightly" -DMOZ_DEBUG=1 -DMOZ_LAYOUT_DEBUGGER=1 -DMOZ_GTK=1 -DJAREXT= -DMOZ_ENABLE_SKIA_PDF=1 -DMOZ_CHILD_PROCESS_NAME=plugin-container -DMOZ_EME_PROCESS_NAME="media-plugin-helper" -DNECKO_WIFI -DDLL_PREFIX=lib -DDLL_SUFFIX=.so -DBIN_SUFFIX= -DDIR_MACOS= -DDIR_RESOURCES= -DBINPATH='bin' -DRESPATH='bin' -DLPROJ_ROOT=en -DENABLE_WEBDRIVER=1 -DA11Y_LOG=1 -DACCESSIBILITY=1 -DBROWSER_CHROME_URL=chrome://browser/content/browser.xhtml -DBROWSER_CHROME_URL_QUOTED='"chrome://browser/content/browser.xhtml"' -DBUILD_CTYPES=1 -DCROSS_COMPILE='' -DEARLY_BETA_OR_EARLIER=1 -DEDITLINE=1 -DENABLE_EXPLICIT_RESOURCE_MANAGEMENT=1 -DENABLE_SHARED_MEMORY=1 -DENABLE_SPIDERMONKEY_TELEMETRY=1 -DENABLE_SYSTEM_EXTENSION_DIRS=1 -DENABLE_TESTS=1 -DENABLE_WASM_AVX=1 -DENABLE_WASM_BRANCH_HINTING=1 -DENABLE_WASM_JSPI=1 -DENABLE_WASM_JS_STRING_BUILTINS=1 -DENABLE_WASM_MEMORY64=1 -DENABLE_WASM_MEMORY_CONTROL=1 -DENABLE_WASM_MOZ_INTGEMM=1 -DENABLE_WASM_MULTI_MEMORY=1 -DENABLE_WASM_RELAXED_SIMD=1 -DENABLE_WASM_SIMD=1 -DENABLE_WASM_TYPE_REFLECTIONS=1 -DENABLE_WASM_VERIFY_SERIALIZATION_FOR_SIZE=1 -DENABLE_WEBDRIVER=1 -DFMT_API=MFBT_API -DFMT_ENFORCE_COMPILE_STRING=1 -DFMT_USE_EXCEPTIONS=0 -DFMT_USE_LOCALE=0 -DFMT_USE_WRITE_CONSOLE=1 -DFORCE_PR_LOG=1 -DGDK_VERSION_MAX_ALLOWED=GDK_VERSION_3_14 -DGDK_VERSION_MIN_REQUIRED=GDK_VERSION_3_14 -DGLIB_VERSION_MAX_ALLOWED=GLIB_VERSION_2_42 -DGLIB_VERSION_MIN_REQUIRED=GLIB_VERSION_2_42 -DGL_PROVIDER_EGL=1 -DGTEST_HAS_RTTI=0 -DHAVE_64BIT_BUILD=1 -DHAVE_ALLOCA_H=1 -DHAVE_BYTESWAP_H=1 -DHAVE_CLOCK_MONOTONIC=1 -DHAVE_CPUID_H=1 -DHAVE_DLADDR=1 -DHAVE_DLFCN_H=1 -DHAVE_EVENTFD=1 -DHAVE_FTS_H=1 -DHAVE_GETCONTEXT=1 -DHAVE_GETC_UNLOCKED=1 -DHAVE_GETOPT_H=1 -DHAVE_GETPAGESIZE=1 -DHAVE_GMTIME_R=1 -DHAVE_INTTYPES_H=1 -DHAVE_LINUX_IF_ADDR_H=1 -DHAVE_LINUX_QUOTA_H=1 -DHAVE_LINUX_RTNETLINK_H=1 -DHAVE_LOCALECONV=1 -DHAVE_LOCALTIME_R=1 -DHAVE_LSTAT64=1 -DHAVE_LUTIMES=1 -DHAVE_MALLINFO=1 -DHAVE_MALLOC_H=1 -DHAVE_MALLOC_USABLE_SIZE=1 -DHAVE_MEMALIGN=1 -DHAVE_NETINET_IN_H=1 -DHAVE_NL_TYPES_H=1 -DHAVE_POSIX_FADVISE=1 -DHAVE_POSIX_FALLOCATE=1 -DHAVE_POSIX_MEMALIGN=1 -DHAVE_PTHREAD_H=1 -DHAVE_RES_NINIT=1 -DHAVE_SETPRIORITY=1 -DHAVE_STAT64=1 -DHAVE_STATFS=1 -DHAVE_STATFS64=1 -DHAVE_STATVFS=1 -DHAVE_STATVFS64=1 -DHAVE_STDINT_H=1 -DHAVE_STRERROR=1 -DHAVE_STRNDUP=1 -DHAVE_SYSCALL=1 -DHAVE_SYS_MOUNT_H=1 -DHAVE_SYS_QUEUE_H=1 -DHAVE_SYS_QUOTA_H=1 -DHAVE_SYS_STATFS_H=1 -DHAVE_SYS_STATVFS_H=1 -DHAVE_SYS_TYPES_H=1 -DHAVE_SYS_VFS_H=1 -DHAVE_THREAD_TLS_KEYWORD=1 -DHAVE_TM_ZONE_TM_GMTOFF=1 -DHAVE_TRUNCATE64=1 -DHAVE_UNISTD_H=1 -DHAVE_UNWIND_H=1 -DHAVE_VISIBILITY_ATTRIBUTE=1 -DHAVE_VISIBILITY_HIDDEN_ATTRIBUTE=1 -DHAVE__UNWIND_BACKTRACE=1 -DJSON_USE_EXCEPTION=0 -DJS_64BIT=1 -DJS_CODEGEN_X64=1 -DJS_DEBUG=1 -DJS_DEFAULT_JITREPORT_GRANULARITY=3 -DJS_GC_ZEAL=1 -DJS_HAS_CTYPES=1 -DJS_HAS_INTL_API=1 -DJS_HAS_TEMPORAL_API=1 -DJS_ION_PERF=1 -DJS_JITSPEW=1 -DJS_MASM_VERBOSE=1 -DJS_PUNBOX64=1 -DJS_STRUCTURED_SPEW=1 -DMALLOC_H='<malloc.h>' -DMALLOC_USABLE_SIZE_CONST_PTR='' -DMOZILLA_OFFICIAL=1 -DMOZILLA_UAVERSION='"137.0"' -DMOZILLA_VERSION='"137.0a1"' -DMOZJS_MAJOR_VERSION=137 -DMOZJS_MINOR_VERSION=0 -DMOZ_ACCESSIBILITY_ATK=1 -DMOZ_APP_UA_VERSION='"137.0a1"' -DMOZ_AUTH_EXTENSION=1 -DMOZ_AV1=1 -DMOZ_BACKGROUNDTASKS=1 -DMOZ_BLOCK_PROFILE_DOWNGRADE=1 -DMOZ_BUILD_APP=browser -DMOZ_BUNDLED_FONTS=1 -DMOZ_CLANG_PLUGIN=1 -DMOZ_CRASHREPORTER=1 -DMOZ_DATA_REPORTING=1 -DMOZ_DAV1D_ASM=1 -DMOZ_D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_DIR='".mozilla"' -DMOZ_USING_WASM_SANDBOXING=1 -DMOZ_VERIFY_MAR_SIGNATURE=1 -DMOZ_VTUNE=1 -DMOZ_WASM_SANDBOXING_EXPAT=1 -DMOZ_WASM_SANDBOXING_GRAPHITE=1 -DMOZ_WASM_SANDBOXING_HUNSPELL=1 -DMOZ_WASM_SANDBOXING_OGG=1 -DMOZ_WASM_SANDBOXING_SOUNDTOUCH=1 -DMOZ_WASM_SANDBOXING_WOFF2=1 -DMOZ_WAYLAND=1 -DMOZ_WEBRTC=1 -DMOZ_WEBRTC_ASSERT_ALWAYS=1 -DMOZ_WEBSPEECH=1 -DMOZ_WEBSPEECH_TEST_BACKEND=1 -DMOZ_WIDGET_GTK=1 -DMOZ_X11=1 -DNECKO_WIFI=1 -DNECKO_WIFI_DBUS=1 -DNIGHTLY_BUILD=1 -DNO_NSPR_10_SUPPORT=1 -DNS_BUILD_REFCNT_LOGGING=1 -DNS_PRINTING=1 -DNS_PRINT_PREVIEW=1 -DSTATIC_JS_API=1 -DSTDC_HEADERS=1 -DTARGET_XPCOM_ABI='"x86_64-gcc3"' -DUSE_FC_FREETYPE=1 -DU_STATIC_IMPLEMENTATION=1 -DU_USING_ICU_NAMESPACE=0 -DWASM_CODEGEN_DEBUG=1 -DWASM_HAS_HEAPREG=1 -DXP_LINUX=1 -DXP_UNIX=1 -DAB_CD=en-US \
[task 2025-03-03T12:55:25.868Z] 12:55:25     INFO -  package> 	--format omni \
[task 2025-03-03T12:55:25.868Z] 12:55:25     INFO -  package> 	--removals /builds/worker/checkouts/gecko/browser/installer/removed-files.in \
[task 2025-03-03T12:55:25.869Z] 12:55:25     INFO -  package> 	 \
Flags: needinfo?(nchevobbe)

put the support file in the wrong folder, will fix this

Flags: needinfo?(nchevobbe)
Pushed by nchevobbe@mozilla.com: https://hg.mozilla.org/integration/autoland/rev/708c552943cb [devtools] Add Debugger support for scripts using import attributes. r=devtools-reviewers,ochameau.
Status: ASSIGNED → RESOLVED
Closed: 14 days ago
Resolution: --- → FIXED
Target Milestone: --- → 138 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: