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

Expose new kind of origins #112

Merged
merged 5 commits into from
Apr 6, 2022
Merged

Expose new kind of origins #112

merged 5 commits into from
Apr 6, 2022

Conversation

dbanck
Copy link
Member

@dbanck dbanck commented Apr 1, 2022

This PR allows schemas to introduce a target for the module source attribute. We achieve this by introducing a new field Targets to the BodySchema.

Example within terraform-schema: hashicorp/terraform-schema#101

Required for hashicorp/terraform-ls#558

decoder/reference_origins.go Outdated Show resolved Hide resolved
schema/body_schema.go Outdated Show resolved Hide resolved
dbanck added 3 commits April 4, 2022 20:02
When the body schema has a valid `Targets` set, we expose
all dependecy keys as DirectOrigin for go to definition.
@dbanck dbanck force-pushed the f-add-expr-targets branch from 77a594a to 96aabd8 Compare April 4, 2022 18:05
@dbanck dbanck marked this pull request as ready for review April 4, 2022 18:17
@dbanck dbanck requested a review from a team April 4, 2022 18:17
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you for all the tests and comments.

LGTM - I just left you some very minor in-line suggestions/comments, but none are blocking.

decoder/decoder.go Outdated Show resolved Hide resolved
reference/origin_direct.go Outdated Show resolved Hide resolved
reference/origin_direct.go Outdated Show resolved Hide resolved
reference/origins.go Outdated Show resolved Hide resolved
reference/origins_test.go Outdated Show resolved Hide resolved
schema/body_schema.go Outdated Show resolved Hide resolved
@radeksimko radeksimko added the enhancement New feature or request label Apr 6, 2022
dbanck and others added 2 commits April 6, 2022 13:56
Co-authored-by: Radek Simko <radek.simko@gmail.com>
Copy link
Member

@radeksimko radeksimko left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

:shipit:

@dbanck dbanck merged commit c20527a into main Apr 6, 2022
@dbanck dbanck deleted the f-add-expr-targets branch April 6, 2022 12:12
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants