autoproj 2.15.2 → 2.15.3

Sign up to get free protection for your applications and to get access to all the features.
checksums.yaml CHANGED
@@ -1,7 +1,7 @@
1
1
  ---
2
2
  SHA256:
3
- metadata.gz: 71eef2ce38657cfce5bca1a2ba483c9c37a81c27ddbe4fa402628badc6de228d
4
- data.tar.gz: 85ade5a6d5b1369cf35d73c412f4d0ea8f6793e665f04e21a5cbb8c3be2e2b12
3
+ metadata.gz: 637e55569497703d3288f3d36fe316c204238c65f32e566811223a4bc9028b44
4
+ data.tar.gz: d55c78b10017e3e9e4b42e879edea1478baaff3c80705eddeca69156c84accf5
5
5
  SHA512:
6
- metadata.gz: 57fc783407a2c34b7544234a18b6da6e1e6510b37516c794185b27d00d58f6cba6697b835325316c93222eaa147a8d0ecc3e2ee57a795132f8eab64a516bc385
7
- data.tar.gz: 2e13951d9cf894f15587542ce21c657ef7252e091bc793e447ce2aa541c24bfcc5bc3dc358d0b5d71c843369dec3de7ed03fd8e55e47895582d56f8ba97d659f
6
+ metadata.gz: 7b6a24e168732906376569b34ba8a3ce562988d3ce4fcb4bb0eafd0e22726b76fe9fcb0f4dbfc4b7b306d2d6683c7e534f2d8d1e7ae1aebdd2bc4404c6fe21fe
7
+ data.tar.gz: 14252a325369a374459ce7115ffba28937e58e64e635e15fc1f1295f6208b2ec38c272799f66b1115668a81b30a3334c27375739e15ddcfa3e29ed4119535343
@@ -32,10 +32,24 @@ module Autoproj
32
32
  @dag.add_edge p, root_pkg_set
33
33
  end
34
34
  end
35
+ end
35
36
 
36
- unless @dag.acyclic?
37
- raise "The package set hierarchy contains cycles: #{@dag.cycles}"
37
+ def verify_acyclic
38
+ return if @dag.acyclic?
39
+
40
+ Autoproj.fatal "The package sets form (a) cycle(s)"
41
+ @dag.cycles.each_with_index do |cycle, index|
42
+ Autoproj.fatal "== Cycle #{index}"
43
+ (cycle + cycle[0, 1]).each_cons(2) do |a, b|
44
+ if b.imports.include?(a)
45
+ Autoproj.fatal " #{b.name} depends on #{a.name} in its source.yml"
46
+ else
47
+ Autoproj.fatal " #{b.name} is after #{a.name} in the package_sets section of the manifest"
48
+ end
49
+ end
38
50
  end
51
+
52
+ raise ConfigError.new "cycles in package set dependencies"
39
53
  end
40
54
 
41
55
  # Flatten the hierarchy, a establish a sorting
@@ -363,6 +377,7 @@ module Autoproj
363
377
  # the local package set (by main configuration) last
364
378
  def sort_package_sets_by_import_order(package_sets, root_pkg_set)
365
379
  c = PackageSetHierarchy.new(package_sets, root_pkg_set)
380
+ c.verify_acyclic
366
381
  sorted_pkg_sets = c.flatten
367
382
 
368
383
  if sorted_pkg_sets.last != root_pkg_set
@@ -793,23 +793,6 @@ module Autoproj
793
793
  vcs
794
794
  end
795
795
 
796
- # Recursively resolve imports for a given package set
797
- def self.resolve_imports(pkg_set, parents = Set.new)
798
- return Set.new if pkg_set.imports.empty?
799
-
800
- updated_parents = parents | [pkg_set]
801
-
802
- imports = pkg_set.imports.dup
803
- pkg_set.imports.each do |p|
804
- if parents.include?(p)
805
- raise "Cycling dependency between package sets encountered:" \
806
- "#{p.name} <--> #{pkg_set.name}"
807
- end
808
- imports.merge(resolve_imports(p, updated_parents))
809
- end
810
- imports
811
- end
812
-
813
796
  # Enumerates the Autobuild::Package instances that are defined in this
814
797
  # source
815
798
  def each_package
@@ -1,3 +1,3 @@
1
1
  module Autoproj
2
- VERSION = "2.15.2"
2
+ VERSION = "2.15.3"
3
3
  end
data/lib/autoproj.rb CHANGED
@@ -63,7 +63,7 @@ require "utilrb/logger"
63
63
 
64
64
  module Autoproj
65
65
  class << self
66
- attr_reader :logger
66
+ attr_accessor :logger
67
67
  end
68
68
  @logger = Logger.new(STDOUT)
69
69
  logger.level = Logger::WARN
metadata CHANGED
@@ -1,14 +1,14 @@
1
1
  --- !ruby/object:Gem::Specification
2
2
  name: autoproj
3
3
  version: !ruby/object:Gem::Version
4
- version: 2.15.2
4
+ version: 2.15.3
5
5
  platform: ruby
6
6
  authors:
7
7
  - Sylvain Joyeux
8
8
  autorequire:
9
9
  bindir: bin
10
10
  cert_chain: []
11
- date: 2022-02-21 00:00:00.000000000 Z
11
+ date: 2022-02-25 00:00:00.000000000 Z
12
12
  dependencies:
13
13
  - !ruby/object:Gem::Dependency
14
14
  name: autobuild