On Thu, 2018-09-06 at 11:03 +0200, Sander Striker wrote:
> Hi,
>
> On Thu, Sep 6, 2018 at 10:10 AM Tristan Van Berkom <tristan vanberkom codethink co uk> wrote:
> > Actually quick follow up here...
> >
> > On Thu, 2018-09-06 at 16:48 +0900, Tristan Van Berkom via BuildStream-list wrote:
> > > Hi Sander,
> > [...]
> > > > > We have a much more intuitive experience when the optional directory
> > > > > argument is a path and not a "workspacename", which can be absolute or
> > > > > relative, and when relative is appended to the default location.
> > > >
> > > > Being pedantic, where relative is appended to the default location if
> > > > it doesn't start with ./ or ../.
> > >
> > > I like this yes, might still be relevant with your `--path` proposal ?
> >
> > Let's not leave any room for ambiguity in implementation here.
> >
> > I think that with this `--path` approach, the default location for
> > workspaces, configured or not, should be ignored completely.
> >
> > Thoughts ?
>
> +1. I think that this will be least confusing.
>
> So an absolute path starts with /. A relative path will be relative
> to the current directory, regardless of whether it starts with ./ or
> not.
>
> Agreed?
Yes, basically the `--path` is interpreted as provided, relative paths
assumed to be relative to the CWD.
I would further say that I expect it to be provided pretty often with a
leading `~/`, but I believe that is normally expanded by the shell and
we only see it as an absolute path.
Great, looks like we're coming to a conclusion, and agree on semantics.
Syntax wise we could use '--directory' instead of '--path' since we already have one location where we are using it, which is bst source-bundle. However..., it looks like we have --directory as a global option as well to specify the project directory, which is unfortunate duplication.
Thoughts?
Cheers,
-Tristan
Cheers,
Sander