dmd
dmd copied to clipboard
Fix issue 22920: Improve errors when missing import paths
This patch introduces errorSupplemental() to the import paths error to display
extra information about them. These error messages are out of sync with `-J`
flag, which have similar purposes. This patch make `-I` behave similarly to
`-J` flag in terms of errors, improving consistency among other error messages
and add some alignment to the main error.
It also improves the message for missing `object.d` file and give better hints
about configured import paths.
This change is particularly crucial for DMD as a library, since error
interfaces writes to a diagnostic handler rather than directly to `stderr`.
Signed-off-by: Luís Ferreira <[email protected]>
Thanks for your pull request, @ljmf00!
Bugzilla references
| Auto-close | Bugzilla | Severity | Description |
|---|---|---|---|
| ✓ | 22920 | enhancement | Improve errors when missing import paths |
Testing this PR locally
If you don't have a local development environment setup, you can use Digger to test this PR:
dub run digger -- build "master + dmd#13885"
How does this improve the error message - the import path is unrelated to the location of the import? Please include such information in the commit title / message (the same applies to your other PR's btw) - see e..g rule 7 in this article
How does this improve the error message - the import path is unrelated to the location of the import? Please include such information in the commit title / message (the same applies to your other PR's btw) - see e..g rule 7 in this article
Sometimes I forgot to add a proper description but this one in specific is still in draft. I strive to do it tho. Thank for the heads up :)
@ljmf00 Any updates on this PR?