You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@buildstream.apache.org by GitBox <gi...@apache.org> on 2022/06/13 01:47:42 UTC

[GitHub] [buildstream] vchernin opened a new issue, #1658: Closing a workspace does not reset old workspace cache

vchernin opened a new issue, #1658:
URL: https://github.com/apache/buildstream/issues/1658

   With `doc/examples/developing`
   
   1. open a workspace
   `bst workspace open hello.bst --force files/src`
   2. do a build and run it
   `bst build --track-all hello.bst && bst shell hello.bst hello`
   (should output Hello World)
   3. close the workspace
   `bst workspace close hello.bst`
   4. make changes to printf in hello.c
   5. build again
   `bst build --track-all hello.bst && bst shell hello.bst hello`
   6. notice your changes from 4. will not show in the build from 5.
   
   This is fixed if you manually remove the `hello` object sitting in `files/src` (leftover from the workspace), but there's no obvious reminder that should be done.
   
   Note I tested with buildstream 1.6.5 and buildstream-external from pypy, by commenting out the bst minimum version in the `project.conf`.
   
   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 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: commits-unsubscribe@buildstream.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] gtristan commented on issue #1658: Opening a workspace on a `local` source directory in the project produces confusing results

Posted by GitBox <gi...@apache.org>.
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: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] gtristan commented on issue #1658: Opening a workspace on a `local` source directory in the project produces confusing results

Posted by GitBox <gi...@apache.org>.
gtristan commented on issue #1658:
URL: https://github.com/apache/buildstream/issues/1658#issuecomment-1169843411

   > Sidenote, if I reset the workspace after 1. on hello.bst, it leads to a stack trace since it can't find files/src.
   
   Note that with BuildStream 1.95.0 I was unable to reproduce any stack trace after creating the strange *self workspace* scenario, and instead I get clean error messages:
   
   
   ### Resetting the self workspace
   ```
   tristan@pony:~/work/buildstream/doc/examples/developing$ bst workspace reset hello.bst
   [--:--:--][        ][    main:core activity                 ] START   Loading elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS Loading elements
   [--:--:--][        ][    main:core activity                 ] START   Resolving elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS Resolving elements
   [--:--:--][        ][    main:core activity                 ] START   Initializing remote caches
   [00:00:00][        ][    main:core activity                 ] SUCCESS Initializing remote caches
   [--:--:--][        ][    main:core activity                 ] START   Removing workspace directory /home/tristan/work/buildstream/doc/examples/developing/files/src
   [00:00:00][        ][    main:core activity                 ] SUCCESS Removing workspace directory /home/tristan/work/buildstream/doc/examples/developing/files/src
   [--:--:--][        ][    main:core activity                 ] INFO    Closed workspace for hello.bst
   [--:--:--][        ][    main:core activity                 ] START   Loading elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS Loading elements
   [--:--:--][        ][    main:core activity                 ] START   Resolving elements
   [00:00:00][        ][    main:core activity                 ] FAILURE Resolving elements
   
   hello.bst [line 13 column 10]: Specified path 'files/src' does not exist
   [--:--:--][        ][    main:core activity                 ] START   Terminating buildbox-casd
   [00:00:00][        ][    main:core activity                 ] SUCCESS Terminating buildbox-casd
   
   ```
   
   ### Building the self workspace
   ```
   tristan@pony:~/work/buildstream/doc/examples/developing$ bst build hello.bst 
   [--:--:--][        ][    main:core activity                 ] START   Build
   [--:--:--][        ][    main:core activity                 ] START   Loading elements
   [00:00:00][        ][    main:core activity                 ] SUCCESS Loading elements
   [--:--:--][        ][    main:core activity                 ] START   Resolving elements
   [00:00:00][        ][    main:core activity                 ] FAILURE Resolving elements
   [00:00:00][        ][    main:core activity                 ] FAILURE Build
   
   
   hello.bst [line 13 column 10]: Specified path 'files/src' does not exist
   ```
   


-- 
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: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org


[GitHub] [buildstream] nanonyme commented on issue #1658: Opening a workspace on a `local` source directory in the project produces confusing results

Posted by GitBox <gi...@apache.org>.
nanonyme commented on issue #1658:
URL: https://github.com/apache/buildstream/issues/1658#issuecomment-1188255228

   @gtristan perhaps there should be API for source plugin to state that workspace is not going to work? Local plugin could set that.


-- 
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: commits-unsubscribe@buildstream.apache.org

For queries about this service, please contact Infrastructure at:
users@infra.apache.org