diff --git a/build_tests/simple/run_builder.rb b/build_tests/simple/run_builder.rb deleted file mode 100644 index 2a37de6..0000000 --- a/build_tests/simple/run_builder.rb +++ /dev/null @@ -1,14 +0,0 @@ -class MyObject < Rscons::Builder - def run(options) - target, sources, cache, env, vars = options.values_at(:target, :sources, :cache, :env, :vars) - env.run_builder(env.builders["Object"].new(env: env, target: target, sources: sources, cache: cache, vars: vars), target, sources, cache, vars) - end -end - -build do - Environment.new do |env| - env.add_builder(MyObject) - env.MyObject("simple.o", "simple.c") - env.Program("simple.exe", "simple.o") - end -end diff --git a/lib/rscons/environment.rb b/lib/rscons/environment.rb index 6b735b4..e2774d2 100644 --- a/lib/rscons/environment.rb +++ b/lib/rscons/environment.rb @@ -281,8 +281,7 @@ module Rscons job[:target], job[:sources], cache, - job[:vars], - allow_delayed_execution: true) + job[:vars]) unless result failure = "Failed to build #{job[:target]}" Ansi.write($stderr, :red, failure, :reset, "\n") @@ -515,10 +514,6 @@ module Rscons # @param options [Hash] # @since 1.10.0 # Options. - # @option options [Boolean] :allow_delayed_execution - # @since 1.10.0 - # Allow a threaded command to be scheduled but not yet completed before - # this method returns. # # @return [String,false] Return value from the {Builder}'s +run+ method. def run_builder(builder, target, sources, cache, vars, options = {}) @@ -554,19 +549,6 @@ module Rscons # with it when the threaded command completes. rv.build_operation = build_operation start_threaded_command(rv) - unless options[:allow_delayed_execution] - # Delayed command execution is not allowed, so we need to execute - # the command and finalize the builder now. - tc = wait_for_threaded_commands(which: [rv]) - rv = finalize_builder(tc) - if rv - call_build_hooks[:post] - else - unless @echo == :command - print_failed_command(tc.command) - end - end - end else call_build_hooks[:post] if rv end diff --git a/spec/build_tests_spec.rb b/spec/build_tests_spec.rb index 6d6c8bf..1c8371a 100644 --- a/spec/build_tests_spec.rb +++ b/spec/build_tests_spec.rb @@ -843,28 +843,6 @@ EOF end end - context "backward compatibility" do - it "allows a builder to call Environment#run_builder in a non-threaded manner" do - test_dir("simple") - result = run_rscons(rsconscript: "run_builder.rb") - expect(result.stderr).to eq "" - expect(lines(result.stdout)).to include *[ - "CC simple.o", - "LD simple.exe", - ] - end - - it "prints the failed build command for a threaded builder when called via Environment#run_builder without delayed execution" do - test_dir("simple") - File.open("simple.c", "wb") do |fh| - fh.write("FOOBAR") - end - result = run_rscons(rsconscript: "run_builder.rb") - expect(result.stderr).to match /Failed to build/ - expect(result.stdout).to match /Failed command was: gcc/ - end - end - context "CFile builder" do it "builds a .c file using flex and bison" do test_dir("cfile")