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

Make web examples runnable with latest dart #748

Closed
wants to merge 1 commit into from

Conversation

dlchet
Copy link

@dlchet dlchet commented Mar 10, 2024

  • pubspec gets latest build_web_compilers
  • README.md specifies working steps to run web examples
  • minor linting issues are ignored

@dlchet dlchet requested a review from hoc081098 as a code owner March 10, 2024 21:30
docs: README.md specifies working steps to run web examples
chore: minor linting issues are ignored
Comment on lines +20 to +21
build_web_compilers: ^4.0.9
lints: ^2.0.0
Copy link
Collaborator

Choose a reason for hiding this comment

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

We should keep the old version of 2 deps, because we support dart >= 2.12

Copy link
Author

Choose a reason for hiding this comment

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

got it. i'll see if i can rework this so the example can be run on 2.12 as well as latest.

Copy link
Author

@dlchet dlchet Mar 24, 2024

Choose a reason for hiding this comment

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

well, i'm not sure how to make the examples work with past and current versions at the same time. i'm on dart 3.3.1 and i run into issues both with the old style of building

% dart run build_runner serve example
[SEVERE] build_web_compilers:sdk_js on asset:build_web_compilers/$package$ (cached):
Error compiling dartdevc module:build_web_compilers|lib/src/dev_compiler/dart_sdk.sound.js
Unhandled exception:
PathNotFoundException: Cannot open file, path = '/opt/homebrew/Caskroom/flutter/3.3.3/flutter/bin/cache/dart-sdk/lib/_internal/ddc_platform_sound.dill' (OS Error: No such file or directory, errno = 2)

and the new style

% webdev serve example               
[SEVERE] Pubspec errors: [The `build_web_compilers` version – 3.2.7 – is not within the allowed constraint – ^4.0.4.
null]
webdev could not run for this project.
The `build_web_compilers` version – 3.2.7 – is not within the allowed constraint – ^4.0.4.

and the new style using old webdev

Activated webdev 2.7.12.
dlchet@Consolation-System rxdart % webdev serve example                  
webdev could not run for this project.
This version of webdev does not support the `build_daemon` protocol used by your version of `build_runner`.
A newer version of webdev is available which supports your version of the `build_daemon`. Please update.

So I'm a bit perplexed on what if anything should be changed. It seems to me that this problem would surface when using a recent Dart even in a separate project, so maybe I will try to make a minimal reproduction in a separate project, and then submit as an issue? @hoc081098 thank you for your attention, let me know if you see anything I'm missing

Copy link
Collaborator

Choose a reason for hiding this comment

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

@dlchet I think we can use a separate pubspec.yaml for web example (similar to flutter/github_search).
Could you try this approach?

@hoc081098
Copy link
Collaborator

hoc081098 commented May 24, 2024

Thanks, but it is obsolete now, because I have converted web example to a new project (by using melos), and it can use latest version of dependencies

@hoc081098 hoc081098 closed this May 24, 2024
@dlchet
Copy link
Author

dlchet commented May 24, 2024

Thanks, but it is obsolete now, because I have converted web example to a new project (by using melos), and it can use latest version of dependencies

That's great, I had meant to come back to this and do exactly that, it seems the right way forward. Appreciate your work!

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.

None yet

2 participants