Skip to content

Commit

Permalink
Fix instability in determining correct library version to use when th…
Browse files Browse the repository at this point in the history
…ere are multiple instances of the same library included.

PiperOrigin-RevId: 651194313
  • Loading branch information
evan-gordon authored and copybara-github committed Jul 11, 2024
1 parent 99b8fa8 commit e07635f
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions parser/parser.go
Original file line number Diff line number Diff line change
Expand Up @@ -152,9 +152,9 @@ func (p *Parser) topologicalSortLibraries(cqlLibs []string) ([]lexedLib, error)
for libID, deps := range includeDependencies {
libNode := goraph.NewNode(libID.Key())
for _, includedID := range deps {
// If the version is not specified, use the latest version. This mimics the behavior found in
// If the version is not specified and doesn't exist, use the latest version. This mimics the behavior found in
// the reference resolver.
if includedID.Version == "" {
if _, ok := includeDependencies[includedID]; !ok && includedID.Version == "" {
for libKey := range includeDependencies {
if libKey.Name != includedID.Name {
continue
Expand Down

0 comments on commit e07635f

Please sign in to comment.