Skip to content

Support textDocument/definition when reusing a single attribute from another target block #78

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

Closed
rcjsuen opened this issue Apr 20, 2025 · 0 comments · Fixed by #80
Closed
Assignees
Labels
enhancement New feature or request

Comments

@rcjsuen
Copy link
Collaborator

rcjsuen commented Apr 20, 2025

It is possible to reuse attributes from another Bake target. We should be able to get a valid response for a textDocument/definition request when the text cursor is around target.foo or target.foo.tags.

target "foo" {
  dockerfile = "foo.Dockerfile"
  tags       = ["myapp:latest"]
}

target "bar" {
  dockerfile = "bar.Dockerfile"
  tags       = target.foo.tags
}
{
  "group": {
    "default": {
      "targets": [
        "bar"
      ]
    }
  },
  "target": {
    "bar": {
      "context": ".",
      "dockerfile": "bar.Dockerfile",
      "tags": [
        "myapp:latest"
      ]
    }
  }
}
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 a pull request may close this issue.

1 participant