usk81  
                
               
                 
              
                  
                    May 13, 2024, 12:55am
                   
                   
              1 
               
             
            
              
Go version 1.22 
Github Repository: public 
deepsource: Free 
 
The following warning occurred with the following directory structure.
warning:
Dependency installation failed. It happens when SSH access to a private dependency is not configured, or when a dependency is not available. Autofix may fail unless this is fixed. To configure SSH access to private dependencies, please read Login - DeepSource .
 
directory:
.
├── .deepsource.toml
├── service
│   └── xxx
│       ├── go.mod
│       └── go.sum
└── shared
    ├── go.mod
    └── go.sum
 
I thought it was a problem with .deepsource.toml, so I tried rewriting it, but it didn’t change.
initial:
version = 1
[[analyzers]]
name = "go"
  [analyzers.meta]
  import_root = "github.com/usk81/myrepo"
 
the current:
version = 1
[[analyzers]]
name = "go"
  [analyzers.meta]
  import_root = "github.com/usk81/myrepo/shared"
[[analyzers]]
name = "go"
  [analyzers.meta]
  import_root = "github.com/usk81/myrepo/service/xxx"
 
             
            
               
               
               
            
            
           
          
            
            
              Hey @usk81 , to configure multiple Go modules, please use import_paths  in your .deepsource.toml.
version = 1
[[analyzers]]
name = "go"
  [analyzers.meta]
  import_paths = ["github.com/usk81/myrepo/shared", "github.com/usk81/myrepo/service/xxx"]
 
             
            
               
               
               
            
            
           
          
            
              
                usk81  
                
               
              
                  
                    May 13, 2024, 11:06am
                   
                   
              3 
               
             
            
              Hi, @sourya 
Thanks for your reply.
I tried this configurations, but return error.
Please check your configurations: import root cannot be empty for repositories with multiple entries in import paths
 
Based on this, I created the following settings and tried it, but it didn’t work.
version = 1
[[analyzers]]
name = "go"
  [analyzers.meta]
  import_root = "github.com/usk81/myrepo"
  import_paths = ["github.com/usk81/myrepo/shared", "github.com/usk81/myrepo/service/xxx"]
 
Maybe it won’t work with my directory structure, so I’m thinking of giving up on using a monorepo and splitting the repository.
             
            
               
               
               
            
            
           
          
            
            
              Hey @usk81 , the Go analyzer is designed to work with multiple modules. Please give us some time to look into why you’re seeing this error.
             
            
               
               
               
            
            
           
          
            
            
              This issue has been fixed. You can retry analysis on your repository to see the analysis results.