FuelLabs / FuelLabs/sway

Detect imports/variables with mis-capitalization

Open
#6,000 0 comments 0 reactions 0 assignees View on GitHub
enhancement
Dominant language
Rust
Stars
61.4k
Forks
5.4k
Avg merge
3h 33m
Merged PRs (30d)
4

Description

I just spent a while debugging this error:

```
4 | asset_id::AssetID,
| ^^^^^^^ Could not find symbol "AssetID" in this scope.
```

Would be nice if the compiler was able to figure out that I probably meant `AssetId` instead of `AssetID`.

Contributor guide

No contributing guide indexed for this repository

Research direction

No file, test, or entry point is named. Start by locating the compiler diagnostic for unresolved imports or variables and trace how symbol suggestions are produced. Done means a missing `AssetID` can suggest `AssetId` when the matching import or variable differs only by capitalization, with coverage for the reported case.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.