Closed Bug 1896514 Opened 2 months ago Closed 2 months ago

`mach lint` runs no lints due to Windows drive case differences

Categories

(Developer Infrastructure :: Lint and Formatting, defect)

defect

Tracking

(firefox128 fixed)

RESOLVED FIXED
128 Branch
Tracking Status
firefox128 --- fixed

People

(Reporter: nalexander, Assigned: nalexander)

Details

Attachments

(1 file)

On my Windows device, mach lint is a hit-or-miss affair that I finally tracked down to https://searchfox.org/mozilla-central/rev/ee2ad260c25310a9fbf96031de05bbc0e94394cc/python/mozlint/mozlint/pathutils.py#54-70. This algorithm doesn't call realpath to have the filesystem normalize the path (see, e.g., Bug 1628726), and therefore it suffers from issues like https://bugs.python.org/issue40368.

Invoking realpath when linting the entire tree might be slow, so we might prefer a "hand-rolled solution" that accommodates drive letter cases but doesn't invoke filesystem APIs.

We hand-roll to avoid os.path.realpath invoking potentially
expensive filesystem APIs.

Assignee: nobody → nalexander
Status: NEW → ASSIGNED

The severity field is not set for this bug.
:andi, could you have a look please?

For more information, please visit BugBot documentation.

Flags: needinfo?(bpostelnicu)
Pushed by nalexander@mozilla.com:
https://hg.mozilla.org/integration/autoland/rev/6b56f526de04
Make `mach lint` accommodate Windows drive case differences. r=ahal
Status: ASSIGNED → RESOLVED
Closed: 2 months ago
Resolution: --- → FIXED
Target Milestone: --- → 128 Branch
Flags: needinfo?(bpostelnicu)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: