Skip to content

Could libsonnet helper files be situated next to the tmp file for gmailctl edit to avoid import path errors? #378

@dbarnett

Description

@dbarnett

With the way gmailctl edit opens an editor on a tmp file, any smart editors/plugins trying to analyze the jsonnet file will tend to get tripped up on libsonnet import paths:

libsonnet import path error in VS Code

Would it be reasonable for gmailctl edit to copy or symlink related files over into a tmp directory so those kinds of things in the editor can work more seamlessly?

So concretely here, instead of copying my ~/.gmailctl/config.jsonnet file to /tmp/gmailctl-645862603.jsonnet and opening that in an editor, it could have created a directory /tmp/gmailctl-645862603/ and set it up like this before spawning an editor on /tmp/gmailctl-645862603/config.jsonnet:

  • copy config.jsonnet
  • symlink *.libsonnet (and potentially other jsonnet or config files that could be relevant)

Metadata

Metadata

Assignees

Labels

kind/featureNew feature or requestlifecycle/keep-aliveDenotes an issues or PR that should never be considered stale.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions