-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Glob patterns with subdirectories whose parent directory does not exist fail #59
Comments
target.$default.sources.include
It looks like we have a test which is generally supposed to be checking this and runs on windows. Can you run the same build with |
$ dart run build_runner build --verbose
[INFO] Entrypoint:Generating build script...
[INFO] Entrypoint:Generating build script completed, took 232ms
[WARNING] Bootstrap:
Invalidated precompiled build script due to missing asset graph.
[INFO] Bootstrap:Precompiling build script......
[INFO] Bootstrap:Precompiling build script... completed, took 673ms
[SEVERE] Build:
Nothing can be built, yet a build was requested.
[INFO] BuildDefinition:Initializing inputs
You have hit a bug in build_runner
Please file an issue with reproduction steps at https://github.com/dart-lang/build/issues
FileSystemException: Directory listing failed, path = 'c:\users\<path>\not\*' (OS Error: Das System kann den angegebenen Pfad nicht finden.
, errno = 3)
Instance of '_StringStackTrace' |
For comparison, this is the WSL/Ubuntu output for the package: $ dart run build_runner build --verbose
[INFO] Entrypoint:Generating build script...
[INFO] Entrypoint:Generating build script completed, took 223ms
[INFO] Bootstrap:Precompiling build script......
[INFO] Bootstrap:Precompiling build script... completed, took 4.2s
[FINE] Bootstrap:Core package locations file does not exist
[SEVERE] Build:
Nothing can be built, yet a build was requested.
[INFO] BuildDefinition:Initializing inputs
[INFO] BuildDefinition:Building new asset graph...
[INFO] BuildDefinition:Building new asset graph completed, took 1.6s
[INFO] BuildDefinition:Checking for unexpected pre-existing outputs....
[INFO] BuildDefinition:Checking for unexpected pre-existing outputs. completed, took 1ms
[INFO] Build:Running build...
[INFO] Build:Running build completed, took 2ms
[INFO] Build:Caching finalized dependency graph...
[INFO] Build:Caching finalized dependency graph completed, took 32ms
[INFO] Build:Succeeded after 46ms with 0 outputs (0 actions) |
Hmm, it still didn't seem to give the actual stack trace unfortunately :/. I am not sure what is different for you compared to what is happening in our test. I wonder if its a windows 11 specific thing? Not sure which version of windows we are on. |
As far as I can tell this must be coming from here, so likely an issue with the Glob package itself. |
Ahah! I have a repro for this issue with the glob package. It happens if you have an explicit subdir listed whos parent dir does not exist (so |
target.$default.sources.include
Actually, there appear to be some tests today which are validating the existing behavior. cc @natebosch wdyt? |
The behavior in |
cc @nex3 would you be opposed to a change here? Specifically today, you can call I doubt changing it to not throw would break anything, but maybe you are aware of some specific patterns or tools (sass?) that rely on that behavior. |
I don't have any problem changing that behavior. Since it's changing an error to a non-error, it's not even technically a breaking change. |
Closes #59 Treated as non-breaking because it only turns errors into non-errors. Ignore all missing directory errors from the filesystem, instead of only ignoring those which come from a directory operation after the first wildcard.
Closes #59 Treated as non-breaking because it only turns errors into non-errors. Ignore all missing directory errors from the filesystem, instead of only ignoring those which come from a directory operation after the first wildcard.
Can we have a pub release of the Thanks. |
While writing my second Builder, I encountered the following:
Steps to reproduce
dart create -t package-simple bug_report
)build_runner:
todev_dependencies
inpubspec.yaml
build.yaml
belowbuild_runner
(e.g. usingdart run build_runner build
) on WindowsExpected Results
Nothing.
<path to project>/not
doesn't exist and shouldn't cause anything. I.e. exactly what happens wheninclude
ing justnot/**
. Under WSL/Ubuntu, the same example package doesn't crash.What builder(s) you are
using(or writing yourself).I'm writing a builder that is supposed to take data from a JSON file and turn it into dart classes at build time.
Dart SDK Version
What package(s) from this repo you are using, and the version
Whether you are using Windows, MacOSX, or Linux
Windows 11
The text was updated successfully, but these errors were encountered: