这是indexloc提供的服务,不要输入任何密码
Skip to content

registry improvments #841

@harlequin

Description

@harlequin

What version?

0.51.4

Which command?

proto install TOOL VERSION --log trace

What happened?

I have tried the implemented registry feature today and found some improvements:

1.) Update documentation

https://moonrepo.dev/docs/proto/config#unstable-registries refers to a setting which is not toml compatible

[settings]
unstable-registries = [
  { registry: "ghcr.io", namespace: "moonrepo" }
]

But it has to be

[settings]
unstable-registries = [
  { registry = "ghcr.io", namespace = "moonrepo" }
]

Additional the mention of the default-registry is missing

2.) Only one registry will be used

In the loader logic https://github.com/moonrepo/proto/blob/v0.51.4/crates/core/src/loader.rs#L62 only one registry, which is equal to the default-registry will be used for searching plugins.

It would be good if the default-registry for the moonrepo plugins will be used, but if users have own registries with closed source plugins, also these registries will be scanned.

3.) default-registry and unstable-registry type mismatch

default-registry is implemented as string and registry as a type of registry and namespace.

The user have to set now the following settings to getting stuff working.

[settings]
auto-install = true
default-registry = "ghcr.io/moonrepo"
unstable-registries = [
  { registry = "ghcr.io/moonrepo" }
]

We have two options here

  • Either, the default-registry will be the same type as unstable-registries
  • Or, unstable-registries is getting String values

Both will work and will lead into a consistent behaviour.

Side Note:
I have tested also the registry:// locator in moon for toolchain plugins, and it's directly working out of the box!
Perfect.
Next improvement for moon would be the loader logic (incl. settings, like default-registry and registries)

Trace logs?

No response

Operating system?

Linux

Architecture?

x64

Metadata

Metadata

Assignees

Labels

bugSomething isn't working

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions