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/03 20:22:33 UTC

[GitHub] [buildstream] abderrahim commented on issue #1642: set_ref not properly globally reflecting to node state changes

abderrahim commented on issue #1642:
URL: https://github.com/apache/buildstream/issues/1642#issuecomment-1146332274

   So I took a dive trying to debug this. The problem seems to be that `Source.__clone_for_uri()` doesn't satisfy this invariant (which seems wrong for something called clone)
   ```
   new_source = self.__clone_for_uri(uri)
   assert new_source.get_ref() == self.get_ref()
   ```
   
   Looking deeper, it looks like `__clone_for_uri()` relies on a field called `__meta`, defined along with the following comments.
   ```
           # FIXME: Reconstruct a MetaSource from a Source instead of storing it.
           self.__meta = meta                              # MetaSource stored so we can copy this source later.
   ```
   
   The problem is that this `__meta` doesn't get updated when a new ref is set via `set_ref()`.
   
   Incidentally, I think that this will only happen when using inline refs and not when using a `project.refs` file, as the refs wouldn't be taken from the meta source in that case.


-- 
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