gtristan commented on issue #1658:
URL: https://github.com/apache/buildstream/issues/1658#issuecomment-1169836398

   I'm renaming this, as what you ended up doing is very unusual - arguably 
BuildStream should simply disallow you to open the workspace in the first place 
with an error message so you don't end up in this state (although, detecting 
this scenario might prove to be tricky).
   
   A workspace is normally useful for `git` sources or other sources, whereas 
the `local` source (where you inject data from your project directory directly 
into the element build) does not really require a workspace, you can just make 
modifications to those files directly and they will be reflected in the build.
   
   > Sidenote, if I reset the workspace after 1. on hello.bst, it leads to a 
stack trace since it can't find files/src.
   
   This is clearly a bug, instead of a stack trace BuildStream should clearly 
bail out with an error message indicating that it was unable to find your local 
sources at `files/src`.
   
   Of course BuildStream would not know at this point if you had done something 
strange like open a workspace on the very directory from whence the source 
originates, so such context would not be included in such an error.
   
   
   Finally, I wonder if you found yourself in this situation by getting 
confused reading https://docs.buildstream.build/1.95/developing/workspaces.html 
?
   
   We use the `local` source in this example because it is the simplest way to 
demonstrate workspace usage (and we actually run the `bst` commands as a part 
of the documentation build so it is helpful to keep things simple), do you have 
any suggestion on text we could add to that document which could avoid this 
confusion ?
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to