Skip to content

Extension API: How to map it to hatch? #378

@flying-sheep

Description

@flying-sheep

Hi! I started implementing https://github.com/flying-sheep/vscode-hatch

Hatch’s env model is:

  1. there are a few pre-defined ones and you can define more
  2. you can create, destroy, and sync any defined env for a project, but none that aren’t pre-defined or defined in Hatch’s config

How should we map this to the extension API?

  • create only makes sense for defined envs. So show a picker dialog for defined envs?
  • remove ditto
  • set & get doesn’t really make sense for Hatch. Would be best if these were optional to implement and this extension didn’t have to track the active env
  • refresh … I don‘t know what it’s for. Is this supposed to re-fetch the list of defined envs or created envs?
  • getEnvironments ditto. I think for Hatch it would make more sense if it returned the list of defined envs and we could respond to onTryingToSetEnvironment event or so to create it
  • clearCache I also don’t know what this is for

I think in general it would be nice to have some examples when these are called. Like what UI action leads to clearCache being called?

cc @karthiknadig

Metadata

Metadata

Assignees

No one assigned

    Labels

    under-discussionIssue is under discussion for relevance, priority, approach

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions