Closed
Bug 1895653
Opened 10 months ago
Closed 9 months ago
Linkify relative path of import/export declaration
Categories
(Webtools :: Searchfox, enhancement)
Webtools
Searchfox
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: arai, Assigned: arai)
References
Details
Attachments
(1 file)
Followup of bug 1895316
import
and export
declarations can use relative path, and that's not covered by bug 1895316.
It would be nice to also linkify them.
require()
can also use relative path, but it might be difficult given the argument is not a complete relative path (lacks extension etc)
Assignee | ||
Comment 1•9 months ago
|
||
There are 3 ways to implement this, based on bug 1896441:
- (1a) in
js-analysis.js
, when relative path is found inimport
/export
, load the URL mapping and resolve the relative path on the corresponding URLs, and generate analysis item withURL_*
symbol, and letreplace-aliases.py
replace theURL_*
item withFILE_*
items - (1b) in
js-analysis.js
, when relative path is found inimport
/export
, load the URL mapping and resolve the relative path on the corresponding URLs, and re-map the URLs to files, and generate analysis item withFILE_*
symbol (do not rely onreplace-aliases.py
given the data is already available) - (2) in
js-analysis.js
, when relative path is found inimport
/export
, generate analysis item with specialRELPATH_*
symbol, and inreplace-aliases.py
, replace theRELPATH_*
item withFILE_*
items
Comment 2•9 months ago
|
||
This is definitely your call, but if you're looking for opinions, Option 2 feels most clean/consistent/flexible. That said, it would be potentially weird for the RELPATH symbols to make it past alias processing, so that might be something where it would be important to make sure they get dropped if not normalized there.
Assignee | ||
Comment 3•9 months ago
|
||
Assignee: nobody → arai.unmht
Assignee | ||
Updated•9 months ago
|
Status: NEW → RESOLVED
Closed: 9 months ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•