Closed Bug 1815260 Opened 2 years ago Closed 2 years ago

./mach esmify finds nothing to migrate under browser/components/attribution on Windows, but does on macOS

Categories

(Core :: XPConnect, defect)

defect

Tracking

()

RESOLVED FIXED
112 Branch
Tracking Status
firefox112 --- fixed

People

(Reporter: mconley, Assigned: arai)

References

Details

Attachments

(1 file)

STR:

  1. Be on Windows
  2. Check out revision 20512741e7b6 of mozilla-central (this is to avoid a false negative if steps are run after bug 1812141 is closed)
  3. Run ./mach esmify browser/components/attribution

ER:

The two JSM files in that revision (MacAttribution.jsm, AttributionCode.jsm) should be converted properly.

AR:

The two files are not found. Here was my console output:

$ ./mach esmify browser/components/attribution
Collecting glean-sdk==52.2.0
  Downloading glean_sdk-52.2.0-py3-none-win_amd64.whl (1.5 MB)
     |████████████████████████████████| 1.5 MB 3.3 MB/s
Collecting semver>=2.13.0
  Using cached semver-2.13.0-py2.py3-none-any.whl (12 kB)
Collecting glean-parser~=7.0
  Downloading glean_parser-7.0.0-py3-none-any.whl (93 kB)
     |████████████████████████████████| 93 kB 958 kB/s
Requirement already satisfied: jsonschema>=3.0.2 in c:\users\mconley\mozilla\mozilla-central\third_party\python\jsonschema (from glean-parser~=7.0->glean-sdk==52.2.0) (3.2.0)
Requirement already satisfied: MarkupSafe<=2.0.1,>=1.1.1 in c:\users\mconley\mozilla\mozilla-central\third_party\python\markupsafe\src (from glean-parser~=7.0->glean-sdk==52.2.0) (2.0.1)
Requirement already satisfied: diskcache>=4 in c:\users\mconley\mozilla\mozilla-central\third_party\python\diskcache (from glean-parser~=7.0->glean-sdk==52.2.0) (4.1.0)
Requirement already satisfied: appdirs>=1.4 in c:\users\mconley\mozilla\mozilla-central\third_party\python\appdirs (from glean-parser~=7.0->glean-sdk==52.2.0) (1.4.4)
Requirement already satisfied: Click>=7 in c:\users\mconley\mozilla\mozilla-central\third_party\python\click (from glean-parser~=7.0->glean-sdk==52.2.0) (7.1.2)
Requirement already satisfied: Jinja2>=2.10.1 in c:\users\mconley\mozilla\mozilla-central\third_party\python\jinja2 (from glean-parser~=7.0->glean-sdk==52.2.0) (2.11.3)
Requirement already satisfied: PyYAML>=5.3.1 in c:\users\mconley\mozilla\mozilla-central\third_party\python\pyyaml\lib3 (from glean-parser~=7.0->glean-sdk==52.2.0) (5.4.1)
Requirement already satisfied: yamllint>=1.18.0 in c:\users\mconley\mozilla\mozilla-central\third_party\python\yamllint (from glean-parser~=7.0->glean-sdk==52.2.0) (1.23.0)
Requirement already satisfied: six>=1.11.0 in c:\users\mconley\mozilla\mozilla-central\third_party\python\six (from jsonschema>=3.0.2->glean-parser~=7.0->glean-sdk==52.2.0) (1.13.0)
Requirement already satisfied: importlib-metadata in c:\users\mconley\mozilla\mozilla-central\third_party\python\importlib_metadata (from jsonschema>=3.0.2->glean-parser~=7.0->glean-sdk==52.2.0) (1.7.0)
Requirement already satisfied: setuptools in c:\users\mconley\mozilla\mozilla-central\third_party\python\setuptools (from jsonschema>=3.0.2->glean-parser~=7.0->glean-sdk==52.2.0) (51.2.0)
Requirement already satisfied: pyrsistent>=0.14.0 in c:\users\mconley\mozilla\mozilla-central\third_party\python\pyrsistent (from jsonschema>=3.0.2->glean-parser~=7.0->glean-sdk==52.2.0) (0.16.0)
Requirement already satisfied: attrs>=17.4.0 in c:\users\mconley\mozilla\mozilla-central\third_party\python\attrs (from jsonschema>=3.0.2->glean-parser~=7.0->glean-sdk==52.2.0) (19.2.0)
Requirement already satisfied: pathspec>=0.5.3 in c:\users\mconley\mozilla\mozilla-central\third_party\python\pathspec (from yamllint>=1.18.0->glean-parser~=7.0->glean-sdk==52.2.0) (0.9.0)
Requirement already satisfied: zipp>=0.5 in c:\users\mconley\mozilla\mozilla-central\third_party\python\zipp (from importlib-metadata->jsonschema>=3.0.2->glean-parser~=7.0->glean-sdk==52.2.0) (3.4.1)
Installing collected packages: semver, glean-parser, glean-sdk
Successfully installed glean-parser-7.0.0 glean-sdk-52.2.0 semver-2.13.0
Collecting psutil<=5.9.4,>=5.4.2
  Using cached psutil-5.9.4-cp36-abi3-win_amd64.whl (252 kB)
Installing collected packages: psutil
Successfully installed psutil-5.9.4
Collecting zstandard<=0.19.0,>=0.11.1
  Using cached zstandard-0.19.0-cp37-cp37m-win_amd64.whl (612 kB)
Installing collected packages: zstandard
Successfully installed zstandard-0.19.0
 0:03.13 [INFO] Setting up jscodeshift...
warning: Watchman unavailable: timed out after waiting 2100ms for read, while executing ('query', 'C:\\Users\\mconley\\mozilla\\mozilla-central', {'fields': ['mode', 'mtime', 'size', 'exists', 'name'], 'since': 'c:0:0', 'expression': ['not', ['anyof', ['dirname', '.hg'], ['name', '.hg', 'wholename']]], 'empty_on_fresh_instance': False, 'sync_timeout': 2000})
warning: Watchman unavailable: timed out after waiting 2100ms for read, while executing ('query', 'C:\\Users\\mconley\\mozilla\\mozilla-central', {'fields': ['mode', 'mtime', 'size', 'exists', 'name'], 'since': 'c:0:0', 'expression': ['not', ['anyof', ['dirname', '.hg'], ['name', '.hg', 'wholename']]], 'empty_on_fresh_instance': False, 'sync_timeout': 2000})
npm WARN deprecated source-map-url@0.4.1: See https://github.com/lydell/source-map-url#deprecated
npm WARN deprecated urix@0.1.0: Please see https://github.com/lydell/urix#deprecated
npm WARN deprecated resolve-url@0.2.1: https://github.com/lydell/resolve-url#deprecated
npm WARN deprecated source-map-resolve@0.5.3: See https://github.com/lydell/source-map-resolve#deprecated

added 350 packages, and audited 351 packages in 8s

18 packages are looking for funding
  run `npm fund` for details

2 vulnerabilities (1 low, 1 high)

To address all issues, run:
  npm audit fix

Run `npm audit` for details.
npm notice
npm notice New major version of npm available! 8.19.3 -> 9.4.1
npm notice Changelog: https://github.com/npm/cli/releases/tag/v9.4.1
npm notice Run npm install -g npm@9.4.1 to update!
npm notice
 0:21.73 [INFO] Searching files to convert to ESM...
 0:23.80 [INFO] Found 0 file(s) to convert to ESM.
 0:23.80 [INFO] Converting to ESM...
 0:23.80 [INFO] Renaming...
 0:23.80 [INFO] Searching files to rewrite imports...
 0:24.84 [INFO] Checking 0 JS file(s). Rewriting any matching imports...
 0:24.84 [INFO] Rewritten 0 file(s).
 0:24.84 [INFO] Applying eslint --fix for 0 file(s)...

This was originally experienced by the student working on bug 1812141, which I then confirmed on my on Windows machine. Interestingly, my macOS machine finds the two JSMs without an issue.

Severity: -- → S3

apparently, mozilla-build's mercurial's set:glob: syntax does not accept backslash as path separator.

Git on windows (https://git-scm.com/download/win) accepts backslash.
so I'll modify the esmify command to always use slash, instead of native path separator, for mercurial.

Assignee: nobody → arai.unmht
Status: NEW → ASSIGNED
Pushed by arai_a@mac.com: https://hg.mozilla.org/integration/autoland/rev/d7a3ddae57e7 Always use slash as path separator for mercurial command parameter in mach esmify command. r=Standard8
Status: ASSIGNED → RESOLVED
Closed: 2 years ago
Resolution: --- → FIXED
Target Milestone: --- → 112 Branch
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: