Compare commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
9141cf91e7 | ||
|
|
7f7e6ef3da | ||
|
|
60b3fdbcac |
No files matched your search
+1
-1
@@ -1,7 +1,7 @@
|
||||
PATH
|
||||
remote: .
|
||||
specs:
|
||||
rscons (1.11.0)
|
||||
rscons (1.11.1)
|
||||
json (~> 1.0)
|
||||
|
||||
GEM
|
||||
|
||||
@@ -560,7 +560,7 @@ env.depends("my_app", "config/link.ld", "README.txt", *Dir.glob("assets/**/*"))
|
||||
### API documentation
|
||||
|
||||
Documentation for the complete Rscons API can be found at
|
||||
http://rubydoc.info/github/holtrop/rscons/frames.
|
||||
http://www.rubydoc.info/github/holtrop/rscons/master.
|
||||
|
||||
## Release Notes
|
||||
|
||||
|
||||
+9
-10
@@ -47,24 +47,18 @@ module Rscons
|
||||
# @return [nil, Hash]
|
||||
# The next job to run.
|
||||
def get_next_job_to_run(targets_still_building)
|
||||
targets_skipped = Set.new
|
||||
@jobs.keys.each do |target|
|
||||
skip = false
|
||||
(@jobs[target][0][:sources] + (@build_dependencies[target] || []).to_a).each do |src|
|
||||
if @jobs.include?(src)
|
||||
if targets_skipped.include?(src) or (src == target)
|
||||
# We have encountered a circular dependency.
|
||||
raise "Circular build dependency for #{src}"
|
||||
end
|
||||
# Skip this target because it depends on another target later in
|
||||
# the job set.
|
||||
targets_skipped << target
|
||||
# Skip this target because it depends on another target not yet
|
||||
# built.
|
||||
skip = true
|
||||
break
|
||||
end
|
||||
if targets_still_building.include?(src)
|
||||
# Skip this target because it depends on another target that is
|
||||
# still being built.
|
||||
# currently being built.
|
||||
skip = true
|
||||
break
|
||||
end
|
||||
@@ -79,7 +73,12 @@ module Rscons
|
||||
return job
|
||||
end
|
||||
|
||||
nil
|
||||
# If there is a job to run, and nothing is still building, but we did
|
||||
# not find a job to run above, then there might be a circular dependency
|
||||
# introduced by the user.
|
||||
if (@jobs.size > 0) and targets_still_building.empty?
|
||||
raise "Could not find a runnable job. Possible circular dependency for #{@jobs.keys.first}"
|
||||
end
|
||||
end
|
||||
|
||||
# Remove all jobs from the JobSet.
|
||||
|
||||
@@ -1,4 +1,4 @@
|
||||
module Rscons
|
||||
# gem version
|
||||
VERSION = "1.11.0"
|
||||
VERSION = "1.11.1"
|
||||
end
|
||||
@@ -735,14 +735,14 @@ EOF
|
||||
it "raises an error for a circular dependency" do
|
||||
test_dir("simple")
|
||||
result = run_test(rsconsfile: "error_circular_dependency.rb")
|
||||
expect(result.stderr).to match /Circular build dependency for (foo|bar|baz)/
|
||||
expect(result.stderr).to match /Possible circular dependency for (foo|bar|baz)/
|
||||
expect(result.status).to_not eq 0
|
||||
end
|
||||
|
||||
it "raises an error for a circular dependency where a build target contains itself in its source list" do
|
||||
test_dir("simple")
|
||||
result = run_test(rsconsfile: "error_circular_dependency2.rb")
|
||||
expect(result.stderr).to match /Circular build dependency for foo/
|
||||
expect(result.stderr).to match /Possible circular dependency for foo/
|
||||
expect(result.status).to_not eq 0
|
||||
end
|
||||
|
||||
|
||||
Reference in new issue
Block a user