You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
A string is a valid URL potentially surrounded by spaces if, after stripping leading and trailing whitespace from it, it is a valid URL.
W3C/HTML5/URLs
I tested this on cabal-install versions; 3.8.1.0, 3.10.1.0, 3.10.2.0, 3.10.3.0 and 3.12.1.0. They all reported an error of "withBinaryFile: does not exist (No such file or directory)", something like this:
$ ~/.ghcup/bin/cabal build all --dry-run --project-file=cabal.tabs-and-spaces.project
/home/.../cabal/https://www.stackage.org/nightly-2024-12-05/cabal.config
: withBinaryFile: does not exist (No such file or directory)
Describe the bug
Cabal treats url with trailing whitespace in import
cabal.project
file as a file pathTo Reproduce
Steps to reproduce the behavior:
When following along with: the users guide
Note: there is a trailing space at the end of the url
=> An error similar to the following is emitted:
=> build proceeds as expected
Expected behavior
The current behaviour is confusing if you don't notice the white space. A better UX would be to:
System information
The text was updated successfully, but these errors were encountered: