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

Completion: Fix completion through an import pointing to a local bind #118

Merged
merged 3 commits into from
Aug 24, 2023

Conversation

julienduchesne
Copy link
Member

Closes #113

This also fixes the go-to-definition functionality for this case, since it's the same code

Base automatically changed from julienduchesne/fix-completion-1 to main August 23, 2023 14:22
@Duologic
Copy link
Member

Duologic commented Aug 23, 2023

This branch works with the case from #113 but fails on this one, a bit of an import chain:

// hello.jsonnet
local hello = {
  to: {
    the: 'world',
  },
};

hello
// hello2.jsonnet
local hello = import 'hello.jsonnet';

hello  // works
//hello.to // does not work
local g = import 'hello2.jsonnet';

{
  a: g.<tab>,
}

@julienduchesne
Copy link
Member Author

This branch works with the case from #113 but fails on this one, a bit of an import chain:

Thanks! I fixed the case where it's a short import chain or a longer one and I added some tests to check it. Should work with an infinite chain now

Copy link
Member

@Duologic Duologic left a comment

Choose a reason for hiding this comment

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

works on my machine

@julienduchesne julienduchesne merged commit fd733b2 into main Aug 24, 2023
4 checks passed
@julienduchesne julienduchesne deleted the julienduchesne/fix-completion-2 branch August 24, 2023 14:05
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Completion fails when exposing field at root
2 participants