Closed jaredallard closed 3 weeks ago
Latest commit: |
0dc741d
|
Status: | ✅ Deploy successful! |
Preview URL: | https://36529a38.stencil-1wj.pages.dev |
Branch Preview URL: | https://jaredallard-refactor-modules.stencil-1wj.pages.dev |
Attention: Patch coverage is 72.19512% with 57 lines in your changes missing coverage. Please review. |
Files | Patch % | Lines |
---|---|---|---|
internal/modules/nativeext/nativeext.go | 40.00% | 18 Missing and 3 partials :warning: | |
internal/modules/resolver/resolver.go | 82.64% | 14 Missing and 7 partials :warning: | |
internal/git/git.go | 68.96% | 6 Missing and 3 partials :warning: | |
internal/modules/module.go | 60.00% | 3 Missing and 1 partial :warning: | |
internal/cmd/stencil/stencil.go | 0.00% | 1 Missing :warning: | |
internal/codegen/tpl.go | 0.00% | 0 Missing and 1 partial :warning: |
:loudspeaker: Thoughts on this report? Let us know!
I'm going to use this as a long-running feature branch instead of one-merge PR. Closing.
This PR contains a few different changes related to modules.
refactor: rename extensions to nativeext
Renames
extensions
tonativeext
and starts cleaning up the module resolving logic to be less all over the place and to better integrate the native extensions code with the rest of the module resolving logic.This also switches from
go-git
to runninggit
commands directly to ease the system authentication story.fix(slogext): export, use os.Stdout for plugin debugging
We need to export the logger if we want clients to be able to use it, so now we're doing that.
We default to
os.Stdout
instead ofos.Stderr
because otherwise log messages will not be plumbed throughgo-plugin
(it only readsstdout
for some reason).refactor(modules): add module resolver
Adds a module resolver library for the purposes of replacing the current version resolver used by the
modules
package. This does not hook it up yet, but provides us a scalable foundation for resolving versions.Future PR(s) will change
stencil
to default to using versions found in the lockfile, as well as adding astencil upgrade
command to upgrade them.The underlying resolver introduced in this PR supports simple constraint functionality to allow flexibility in its usage in
stencil
, but there is currently no plans to expose this functionality. Tests have been added to ensure that the following behaviour is followed:v1.0.0-alpha.1
againstv1.0.0-beta.1
generally speaking, so we instead only allow pre-release criterias to opt into a specific pre-release track. Released versions till rank higher.