Can't make bundle. Require problem


#1

I can’t find module when make bundle. I know about Strange “require” bug . But looks like everything should be ok. Yesterday all working. I find commit after all break, but i don’t make changes that can break it.

ERROR:SCRIPT: libs/hc/hc.lua:26: module 'libs.hc.class' not found:
        no file 'libs.hc.class'
stack traceback:
        [C]: in function 'require'
        libs/hc/hc.lua:26: in main chunk
        [C]: in function 'require'
        scenes/game/entities/collision_group.lua:3: in main chunk
        [C]: in function 'require'
        scenes/game/entities/entities.lua:4: in main chunk
        [C]: in function 'require'
        assets/levels/levels.lua:1: in main chunk
        [C]: in function 'require'
        scenes/logo/logo_scene.lua:6: in main chunk
        [C]: in function 'require'
        init_controller.script:9: in main chunk

libs.hc.hc

local class = require "libs.hc.class"

On android i get strange warning. In pc no such warning.

 W/defold: WARNING:CRASH: Number of modules exceeds capacity

#2

Strange.
I remove comment, and all work. WTF :mage:

-- keep track of where/how big the shape is
	--[[for _, f in ipairs({'move'}) do
		local old_function = shape[f]
		shape[f] = function(this, ...)
			old_function(this, ...)
			self._hash:update(this,this:bbox())
			return this
		end
	end--]]

#3

Not really sure what’s going on. Can you still reproduce the problem? Can you share the project?


#4

Does it happen if the --]] is on its own line?


#5

I add you to project. Commit:99972e6c77decb2c086bee29e3dc192bafdff08f(fix rotation/scale/move function stack) all work.
Commit:03e483aa7dc48c7e1e98988396222e7e568e1452(increase rotation move performance ) error.
if remove comment from libs.hc.hc 1 all work

-- keep track of where/how big the shape is
	--[[for _, f in ipairs({'move'}) do
		local old_function = shape[f]
		shape[f] = function(this, ...)
			old_function(this, ...)
			self._hash:update(this,this:bbox())
			return this
		end
	end--]]