Skip to content

Support directories outside of the current workspace #36

@markovejnovic

Description

@markovejnovic

At the current state of things, hm does not support injecting directories outside of the current workspace. A good, ergonomic solution, would enable users to mount directories outside of the current workspace.

I am unclear on what this interface should look like, perhaps we should do:

hm.external(path="../foobar")

or perhaps it could be automatic — if we detect that any path you're referencing references .., we could automatically mount it.

I lean towards the prior solution, since there's an open-ended question for the CI push flow — we simply don't have access to external directories in that flow, so it could be a good idea to do

hm.cond(hm.source == "push", hm.https("..."), hm.dir(path="..."))

or even better:

@hm.target()
def external_repo() -> hm.Target:
  if hm.source == "push":
    return hm.https("...")
  else:
    return hm.dir(path="...")

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions