optional deps - should I file a bug or is this expected? #2258
                  
                    
                      rbtcollins
                    
                  
                
                  started this conversation in
                General
              
            Replies: 1 comment 2 replies
-
| This is somewhat expected. Dependencies are generated from a snapshot of the current workspace and only as far as cargo can see it. Optional features which enable dependencies must be enabled when you generate dependencies or they'll be skipped. If you want this level of control you'll probably need to manage dependencies yourself instead of using the  | 
Beta Was this translation helpful? Give feedback.
                  
                    2 replies
                  
                
            
  
    Sign up for free
    to join this conversation on GitHub.
    Already have an account?
    Sign in to comment
  
        
    
Uh oh!
There was an error while loading. Please reload this page.
-
I have a crate that I would like to have dual-build enabled to facilitate migrations internally.
It has a feature:
and a build.rs that uses the dep.
When I pass
crate_features=["foo"]to the cargo_build_script rule, it correctly enables the code, but fails to compile due to missing dependenciesIf I remove the
dep:barfrom the feature and mark the dependency as non-optional, it compiles, but this breaks non-bazel use.Am I doing it wrong or is this a bug?
Beta Was this translation helpful? Give feedback.
All reactions