Skip to content
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

Update examples dependencies and fix lints #246

Merged
merged 4 commits into from
Apr 20, 2024

Conversation

robsonsilv4
Copy link
Contributor

@robsonsilv4 robsonsilv4 commented Apr 18, 2024

This pull request updates the dependencies, Dart, and Flutter constraints of all examples.

  • auth_flow
  • clean_architecture
  • crud_dio
  • dart_examples
  • drift_example
  • flutter_counter
  • eval_calculator
  • flutter_async
  • flutter_colorband
  • node_based_editor
  • get_it_signals
  • html_canvas
  • html_todo_app
  • persist_shared_preferences
  • rxdart
  • shopping_cart

Benchmark constraints and dependencies are updated too. And update the lock dependencies of these packages examples:

  • signals
  • singals_flutter
  • signals_dev_tools

Additionally, fix all possible examples of lint rules.

@robsonsilv4
Copy link
Contributor Author

Hi @rodydavis, I'm having this problem when trying to generate the code for drift_example:

[WARNING] .dart_tool/build/entrypoint/build.dart:6:8: Error: Error when reading 'tool/builder.dart': No such file or directory
import '../../../tool/builder.dart' as _i4;
       ^
.dart_tool/build/entrypoint/build.dart:43:10: Error: Undefined name 'CopyCompiledJs'.
    [_i4.CopyCompiledJs.new],
         ^^^^^^^^^^^^^^
.dart_tool/build/entrypoint/build.dart:43:25: Error: 'new' can only be used as a constructor reference.
    [_i4.CopyCompiledJs.new],
                        ^^^
[INFO] Precompiling build script... completed, took 983ms
[SEVERE] Failed to precompile build script .dart_tool/build/entrypoint/build.dart.
This is likely caused by a misconfigured builder definition.

Did you already have a similar problem or know how to fix it?

CC: @simolus3

I'm using:

• Flutter version 3.19.5 on channel stable
• Upstream repository https://github.com/flutter/flutter.git
• Framework revision 300451adae (3 weeks ago), 2024-03-27 21:54:07 -0500
• Engine revision e76c956498
• Dart version 3.3.3
• DevTools version 2.31.1

@rodydavis
Copy link
Owner

Haven't seen that one before! But definitely run flutter clean for sure

@robsonsilv4
Copy link
Contributor Author

robsonsilv4 commented Apr 18, 2024

Already tried it, but I get the same error.
The error is happening in the main branch as well.

I will try out a previous version of Flutter and report back...

@robsonsilv4
Copy link
Contributor Author

The same applies to Flutter version 3.19.6 and previous version 3.16.9.
Should I open an issue with this? @rodydavis

Steps to reproduce:

cd examples/drift_example

flutter clean
flutter pub get
dart run build_runner build --delete-conflicting-outputs

@simolus3
Copy link

The example appears to have been adapted from an example in the drift repository, but it's missing this file causing build failures.

You can add that file to fix the build, or download a prebuilt drift_worker.js from the releases and drop it into web/. Or, if web support is not particularly important for that example, remove the build.yaml and don't support running it on the web.

@robsonsilv4
Copy link
Contributor Author

Thank you, @simolus3, this is precisely the problem.
I added the file and builder dependencies to complete the example port:

[INFO] Running build completed, took 36.6s
[INFO] Caching finalized dependency graph completed, took 533ms
[INFO] Succeeded after 37.2s with 2463 outputs (8926 actions)

@rodydavis, you can look at the PR when you have some time 🚀

Copy link
Owner

@rodydavis rodydavis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM 🎉✅

@rodydavis rodydavis merged commit f9f9710 into rodydavis:main Apr 20, 2024
2 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants