mirror of
https://github.com/zhigang1992/RubyMotion.git
synced 2026-04-01 17:39:54 +08:00
fix a bug in build system where it would cause "stack level too deep" error
http://hipbyte.myjetbrains.com/youtrack/issue/RM-112 1) specify file dependencies in Rakefile with `app.files_dependencies' by user. 2) detect file dependencies by build system When merge 1) and 2), it might cause a cyclic references. So, we will use 1) to detect cyclic references.
This commit is contained in:
@@ -141,8 +141,7 @@ module Motion; module Project;
|
||||
|
||||
# Resolve file dependencies
|
||||
if config.detect_dependencies == true
|
||||
deps = Dependency.new(config.files).run
|
||||
config.dependencies = deps.merge(config.dependencies)
|
||||
config.dependencies = Dependency.new(config.files, config.dependencies).run
|
||||
end
|
||||
|
||||
# Feed builders with work.
|
||||
@@ -629,8 +628,9 @@ PLIST
|
||||
|
||||
@file_paths = []
|
||||
|
||||
def initialize(paths)
|
||||
def initialize(paths, dependencies)
|
||||
@file_paths = paths.flatten.sort
|
||||
@dependencies = dependencies
|
||||
end
|
||||
|
||||
def cyclic?(dependencies, def_path, ref_path)
|
||||
@@ -662,7 +662,7 @@ PLIST
|
||||
end
|
||||
end
|
||||
|
||||
dependency = {}
|
||||
dependency = @dependencies.dup
|
||||
consts_defined.each do |const, def_path|
|
||||
if consts_referred[const]
|
||||
consts_referred[const].each do |ref_path|
|
||||
|
||||
Reference in New Issue
Block a user