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

Suggest use as a dev_dependency instead of global install #2497

Open
sigurdm opened this issue Sep 25, 2024 · 6 comments · May be fixed by #2511
Open

Suggest use as a dev_dependency instead of global install #2497

sigurdm opened this issue Sep 25, 2024 · 6 comments · May be fixed by #2511
Labels
P3 A lower priority bug or feature request package:webdev triaged type-enhancement A request for a change that isn't a bug

Comments

@sigurdm
Copy link
Contributor

sigurdm commented Sep 25, 2024

Why don't we recommend installing webdev as a dev_dependency? (here).

Then we could add the constraints

dependencies:
  build_runner: ^2.4.0
  build_web_compilers: ^4.0.4

And we would not have to manually validate constraints of the current apps pubspec.lock, but rely on the pub solver to do it..

Maybe I'm missing something obvious. But it seemed to work when I tried.

@bkonyi
Copy link
Collaborator

bkonyi commented Sep 25, 2024

How would users run webdev as a dev dependency (I know it's possible, I just don't remember the CLI syntax)? We could definitely recommend this approach, but we won't be able to remove support for the current workflow given most users will be activating webdev as a global package.

On a side note, I'd like to move this repository into the SDK and expose webdev through the CLI, which will remove the need for depending on webdev via pub at all.

@bkonyi bkonyi added type-enhancement A request for a change that isn't a bug P3 A lower priority bug or feature request triaged labels Sep 25, 2024
@parlough
Copy link
Member

parlough commented Sep 25, 2024

How would users run webdev as a dev dependency?

Just dart run webdev build. It's always been my preferred way of using webdev in projects, but I always assumed I was missing context on why it was suggested to install it globally.

On a side note, I'd like to move this repository into the SDK and expose webdev through the CLI, which will remove the need for depending on webdev via pub at all.

+1 This would make our web development docs/story much more straightforward and consistent.

@sigurdm
Copy link
Contributor Author

sigurdm commented Sep 30, 2024

On a side note, I'd like to move this repository into the SDK and expose webdev through the CLI, which will remove the need for depending on webdev via pub at all.

But there would still be a need to align with the versions of build_runner and build_web_compilers ?

In that case making it a dev-dependency might be easier (or are those also moving to the sdk?)

@bkonyi
Copy link
Collaborator

bkonyi commented Sep 30, 2024

There's a lot of details that we'll need to figure out before we'd move the contents of this repo to the SDK (if it's even possible to do cleanly). However, I'm optimistic we can come up with a solution that would remove the need for depending on packages to build and serve web applications.

@sigurdm
Copy link
Contributor Author

sigurdm commented Sep 30, 2024

There's a lot of details that we'll need to figure out before we'd move the contents of this repo to the SDK (if it's even possible to do cleanly). However, I'm optimistic we can come up with a solution that would remove the need for depending on packages to build and serve web applications.

What is the ETA? Is it worth fixing this issue in the mean-time?

@bkonyi
Copy link
Collaborator

bkonyi commented Sep 30, 2024

What is the ETA? Is it worth fixing this issue in the mean-time?

Eventually... :-)

There's no concrete plans yet, so it's definitely worth updating documentation for now.

@sigurdm sigurdm linked a pull request Oct 22, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
P3 A lower priority bug or feature request package:webdev triaged type-enhancement A request for a change that isn't a bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants