Support target json file extension in various cases (json, JSON)
Open
Nobody has claimed this yet.
A-target-specs
C-bug
T-compiler
- Dominant language
- Rust
- Stars
- 119k
- Forks
- 16.1k
- PR merge metrics
- PR metrics pending
Description
Currently user's target json file can have only json form, but for file that ends with `.JSON' rustc returns error:
error: Error loading target specification: Could not find specification for target "my-target.JSON". Run `rustc --print target-list` for a list of built-in targets
Where it useful?
Old OS and old file-systems such as FAT (that stored the files names and extensions as all caps).
Meta
rustc --version --verbose:
rustc 1.81.0-nightly (ba1d7f4a0 2024-06-29)
binary: rustc
commit-hash: ba1d7f4a083e6402679105115ded645512a7aea8
commit-date: 2024-06-29
host: aarch64-apple-darwin
release: 1.81.0-nightly
LLVM version: 18.1.7
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported failure with a target JSON file whose name ends in .JSON, using the affected rustc target-specification path. Read the target-list and target specification handling reached by that invocation. Done means target files with both json and JSON extensions are accepted, with coverage for the reported case.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- compilers
- Issue type
- Bug
- Difficulty
- 3/5
- Estimated time
- 1-2 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100