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

A .manifest file is not recognized as a project root by the new file templating #1077

Closed
anderseknert opened this issue Sep 9, 2024 · 0 comments · Fixed by #1081
Closed
Labels
bug Something isn't working language server protocol

Comments

@anderseknert
Copy link
Member

Given a directory like:

.
├── .regal
│   └── config.yaml
└── bundle
    └── .manifest

I would expect the templating of a new file under the bundle directory to use bundle as a root, and a new file (foo/bar/policy.rego) to have package foo.bar. Instead, the workspace root is used, and package ends up as bundle.foo.bar

@anderseknert anderseknert added bug Something isn't working language server protocol labels Sep 9, 2024
anderseknert added a commit that referenced this issue Sep 9, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes #1077

Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert added a commit that referenced this issue Sep 9, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes #1077

Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert added a commit that referenced this issue Sep 9, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes #1077

Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert added a commit that referenced this issue Sep 9, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes #1077

Signed-off-by: Anders Eknert <anders@styra.com>
anderseknert added a commit that referenced this issue Sep 9, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes #1077

Signed-off-by: Anders Eknert <anders@styra.com>
charlieegan3 pushed a commit that referenced this issue Sep 9, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes #1077

Signed-off-by: Anders Eknert <anders@styra.com>
srenatus pushed a commit to srenatus/regal that referenced this issue Oct 1, 2024
We previously traversed the path downwards, so if we had
`foo/bar/.manifest` and `foo/bar/baz` was provided, we would
not find `foo/bar` as a root. Now search for manifests from the
root.

Fixes StyraInc#1077

Signed-off-by: Anders Eknert <anders@styra.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working language server protocol
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant