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

   Context: https://lists.apache.org/thread/scsz1ybc25d3x1oy33onfmm8rhr0kddg
   
   We want to be able to export the CAS digest of certain dependencies to the 
sandbox. This can be used in conjunction with something like 
https://github.com/apache/buildstream/pull/1772 to have more correct cache keys 
for bazel/RECC, but can be more generally useful on its own to include this 
information about dependencies in its own artifacts.
   
   This is to be implemented via a [dependency 
configuration](https://docs.buildstream.build/2.4/main_glossary.html#term-Dependency-configuration),
 similar to the already existing 
[`location`](https://docs.buildstream.build/2.4/buildstream.buildelement.html#location-for-staging-dependencies).
 As this happens pretty late in the element lifecycle, it cannot be exported as 
a buildstream variable. It will instead be exported as an environment variable 
in the sandbox.
   
   For example:
   
   ```
   dependencies:
   - foo.bst
   - bar.bst
   - filename: gcc.bst
     config:
       digest-environment: RECC_TOOLCHAIN_KEY
   ```
   
   One thing to take into consideration implementeng this is that we don't yet 
have any way for a plugin to find the CAS digest of a dependency except for 
staging it into the sandbox. We will need to add some public API to allow this. 
Either public API to manipulate dependency artifacts as `Directory` instances 
directly, or a way to create a throwaway dummy sandbox, that can't run any 
commands but can be passed to existing APIs such as `Element.stage_artifact()` 
and `Element.stage_dependency_artifacts()`.
   


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