drift icon indicating copy to clipboard operation
drift copied to clipboard

I cannot make the g file

Open ourweb4 opened this issue 10 months ago • 5 comments

HI, I made a program using drift one day the g file was there however now I have not g file. So I tried remaking the g file and this is what is says Describe the bug

[INFO] Generating build script completed, took 164ms
[WARNING] Invalidated precompiled build script due to missing asset graph.
[INFO] Precompiling build script... completed, took 396ms
[INFO] Building new asset graph completed, took 800ms
[INFO] Checking for unexpected pre-existing outputs. completed, took 0ms
[SEVERE] Unhandled build failure!
Invalid argument(s): name shouldn't end with a '.'
package:logging/src/logger.dart 85:7   new Logger._named
package:logging/src/logger.dart 67:47  new Logger.<fn>
dart:collection                        _LinkedHashMapMixin.putIfAbsent
package:logging/src/logger.dart 67:16  new Logger
package:logging/src/logger.dart 96:16  new Logger._named
package:logging/src/logger.dart 67:47  new Logger.<fn>
dart:collection                        _LinkedHashMapMixin.putIfAbsent
package:logging/src/logger.dart 67:16  new Logger
package:build_runner_core              _SingleBuild._runForInput.<fn>.<fn>
package:pool/pool.dart 127:14          Pool.withResource

[SEVERE] Failed after 8.1s

A clear and concise description of what the bug is. Please briefly describe what behavior you expected, what behavior you saw, and how the bug can be reproduced.

ourweb4 avatar Jan 24 '25 15:01 ourweb4

Do you have a file that ends with a dot in your project?

simolus3 avatar Jan 24 '25 23:01 simolus3

Not sure about OP, but I am getting the same error from running dart run build_runner build --delete-conflicting-outputs and can confirm I don't have any files ending with . in my project. I'm running [email protected] so should already have 0f21a01.

Looks like a mystery outdated dependency...

cheajer avatar Mar 08 '25 06:03 cheajer

Hm, my fix to build_runner hasn't been released yet. If you want to track this down, you could run .dart_tool/build/entrypoint/build.dart with a Dart debugger (pass the same arguments to the program, build -d. Then you could set a breakpoint on Logger._named to figure out when the faulty logger gets created. That should point toward the broken asset responsible for this.

simolus3 avatar Mar 08 '25 10:03 simolus3

I have the same issue. Any update?

Faiz-rhm avatar Jun 10 '25 14:06 Faiz-rhm

Could you also try running the generated build script with a debugger and break on exceptions? When the exception occurs, it would be good to see the package:build_runner_core _SingleBuild._runForInput.<fn>.<fn> line and which asset id it's running on.

simolus3 avatar Jun 10 '25 15:06 simolus3