Commit Graph

18 Commits

Author SHA1 Message Date
Shreyas Goenka fec73db111
address comments 2024-09-26 17:47:07 +02:00
Shreyas Goenka d9cf582287
fix failing tests 2024-09-26 17:14:43 +02:00
Shreyas Goenka 4734249854
convert inline tests to files 2024-09-26 16:51:46 +02:00
Shreyas Goenka d14b1e2cca
directly pass config value 2024-09-26 16:07:32 +02:00
Shreyas Goenka 5308ad8bf3
split into summary and detail 2024-09-26 16:03:49 +02:00
Shreyas Goenka fd01824ee1
- 2024-09-26 15:39:41 +02:00
Shreyas Goenka 894f4aab4e
fix windows test 2024-09-24 17:54:13 +02:00
Shreyas Goenka e31dcc2724
fix logic for dedup 2024-09-24 17:47:48 +02:00
Shreyas Goenka 5bf916357a
return if diags has error 2024-09-24 17:42:03 +02:00
Shreyas Goenka f3d7f09150
fix failing tests 2024-09-24 17:39:20 +02:00
Shreyas Goenka 3571410209
cleanup todos 2024-09-24 17:31:50 +02:00
Shreyas Goenka ccbd199422
add info block 2024-09-24 17:29:10 +02:00
Shreyas Goenka fa6b68c410
add unit tests 2024-09-24 16:39:02 +02:00
Shreyas Goenka 5c351d7ea3
more wip on making it work 2024-09-24 14:49:57 +02:00
Shreyas Goenka 458dbfb04d
- 2024-09-24 14:49:41 +02:00
Shreyas Goenka 667fe6bf38
Add detection and info diagnostic for convention for `.<resource-type>.yml` files 2024-09-24 14:49:41 +02:00
Pieter Noordhuis eea34b2504
Return diagnostics from `config.Load` (#1324)
## Changes

We no longer need to store load diagnostics on the `config.Root` type
itself and instead can return them from the `config.Load` call directly.
It is up to the caller of this function to append them to previous
diagnostics, if any.

Background: previous commits moved configuration loading of the entry
point into a mutator, so now all diagnostics naturally flow from
applying mutators.

This PR depends on #1319.

## Tests

Unit and manual validation of the debug statements in the validate
command.
2024-03-28 10:59:03 +00:00
Pieter Noordhuis ca534d596b
Load bundle configuration from mutator (#1318)
## Changes

Prior to this change, the bundle configuration entry point was loaded
from the function `bundle.Load`. Other configuration files were only
loaded once the caller applied the first set of mutators. This
separation was unnecessary and not ideal in light of gathering
diagnostics while loading _any_ configuration file, not just the ones
from the includes.

This change:
* Updates `bundle.Load` to only verify that the specified path is a
valid bundle root.
* Moves mutators that perform loading to `bundle/config/loader`.
* Adds a "load" phase that takes the place of applying
`DefaultMutators`.

Follow ups:
* Rename `bundle.Load` -> `bundle.Find` (because it no longer performs
loading)

This change depends on #1316 and #1317.

## Tests

Tests pass.
2024-03-27 10:49:05 +00:00