Closed subfuzion closed 3 years ago
How do I reproduce this?
Update the Dockerfile like the other examples to use the official image, try and build.
I just looked at it again, looks like the current example probably hasn't been working for a while:
dart run build_runner build --delete-conflicting-outputs
Output:
$ dart run build_runner build --delete-conflicting-outputs
Precompiling executable... (5.4s)
Failed to precompile build_runner:build_runner:
...
Have you run pub upgrade
in the directory first? It's working fine for
me...
On Mon, May 17, 2021 at 7:49 PM Tony Pujals @.***> wrote:
This is the commit that breaks the example: 79e4e4fd https://github.com/GoogleCloudPlatform/functions-framework-dart/commit/79e4e4fd82d2241bc03f80aa3dd7624de019b917 (PR #219 https://github.com/GoogleCloudPlatform/functions-framework-dart/pull/219 ).
— You are receiving this because you were assigned. Reply to this email directly, view it on GitHub https://github.com/GoogleCloudPlatform/functions-framework-dart/issues/229#issuecomment-842783893, or unsubscribe https://github.com/notifications/unsubscribe-auth/AAAEFCRA47RAJBOOQ7L4DQTTOHITDANCNFSM45BOCRFA .
I have. And the image doesn't build either, so that shouldn't be my environment. Anyway, why don't you just update the sample (as I originally asked) and if it works for you, then that's great. I updated the other samples.
So git clean fdx
fixed the issue for me:
$ git clean -fdx
Removing .dart_tool/
Removing .packages
Removing pubspec.lock
But since the .dockerignore
ensures that the first two weren't included in the docker build context, it seems that removing pubspec.lock
is what needed to be done to fix.
So this makes me realize that we're versioning an application, but we're not committing the lock file.
I'll add the lock file with an update for the example. Otherwise, the fix is to run dart pub upgrade
to force Dart to update it.
Reopening. Will close this with #230.
Will need to take a look at builder framework internals for
'Iterable<Object?>', which does not match the return type, 'Iterable<Object>', of the overridden method, 'StructuredSerializer.serialize'