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

fix: bud install conflicts #779

Closed
wants to merge 153 commits into from
Closed

fix: bud install conflicts #779

wants to merge 153 commits into from

Conversation

kellymears
Copy link
Member

@kellymears kellymears commented Dec 6, 2021

This should absolutely not be merged until after 5.0.0 is released and we have space to do next builds that aren't majorly disruptive to peoples workflows.

Problem

bud's handling of transitive dependencies is insufficient to deal with bud extensions that rely on other extensions (see sage -> wordpress-preset -> react -> babel)

this is the primary cause of issues like #567, #730. actually, installs work fine if you are installing a root level extension (like babel, sass). it is only when installing presets and the like that the problems come to the fore.

Rundown

  • if an extensions declares another one as a dependency then they will be registered in that implied order (i think if it is cyclical it ends up being a race and also don't do this)
  • if an extension has unmet dependencies it will be marked as invalid and bud won't process its major callbacks
  • if an extension has unmet dependencies and is depended on by other extensions all of them are flagged invalid
  • unmet dependencies are tracked separately from missing extensions. because they are super stupid different.
    • when you run install it will install all missing extensions, first.
    • then, it rebuilds the project graph
    • then it installs missing dependencies
    • otherwise you might have to run install more than once.. because with each extensions you pull in additional deps. that weren't present during the first run, and it needs to keep doing sets of installs until it reaches bottom. extensions first. deps all at the end.

Changelog

  • fix: $ bud install (and other commands) displaying a loading spinner and "compiling" message during run
  • improve: more directly utilize bud instance for installation.
  • use a graph api to instantiate extensions in an order that is sensitive to extension dependencies
  • will skip instantiating/registering/booting extensions which have unmet dependencies

refs: #567, #730

renovate-bot and others added 30 commits November 25, 2021 11:10
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Co-authored-by: Renovate Bot <bot@renovateapp.com>
- adds sync filter: `'config.override'` (`build` namespace is reserved for compiler)
- modifies`bud.config` to pass built config to `bud.hook.on('config.override')` event.
	- this happens directly before `bud.build` verifies the configuration (strips `undefined` and `null` values)
- `bud.override` is just an alias for `bud.config`.
- fix: `hooks.filter` and `hooks.promised` will now tap the function passed to them if the supplied value is a `CallableFunction` type
Co-authored-by: Renovate Bot <bot@renovateapp.com>
Base automatically changed from next to main December 19, 2021 08:06
@QWp6t QWp6t changed the base branch from main to next December 19, 2021 08:29
@kellymears kellymears mentioned this pull request Dec 27, 2021
3 tasks
@kellymears kellymears closed this Dec 28, 2021
@kellymears
Copy link
Member Author

closed in favor of #886

@QWp6t QWp6t deleted the fix-install branch December 28, 2021 07:50
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment