Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

to be compilable #39

Merged
merged 1 commit into from
Mar 9, 2018
Merged

Conversation

katsuyoshi
Copy link
Contributor

In my environment I could build by swapping lines.

In my environment I could build by swapping lines.
@colinta
Copy link
Contributor

colinta commented Mar 9, 2018

Awesome, that's simple enough - I think we could even just remove the lines alias_method :plus_without_duration... and alias_method :minus_without_duration...

@colinta
Copy link
Contributor

colinta commented Mar 9, 2018

Ah nevermind we do need that line.

@colinta colinta merged commit 2650aff into rubymotion-community:master Mar 9, 2018
@jbender
Copy link
Collaborator

jbender commented Mar 9, 2018

I'm pretty sure that this nullifies the purpose of those lines.

   alias_method :plus_without_duration, :+
   alias_method :+, :plus_with_duration 

copies out the original + method (without duration), then adds the new one in

   alias_method :+, :plus_with_duration 
   alias_method :plus_without_duration, :+

aliases the new method (with duration) then immediately aliases that (still with duration) to the (misleading) name of plus_without_duration

@katsuyoshi
Copy link
Contributor Author

I did not think deeply.
I just made it possible to compile.

I think this problem depends on loading file order.
Probably calculations.rb is first and date.rb is later loaded.
If it's able to control loading order, I think that the source before I changed is compilable.

@wndxlori
Copy link
Contributor

This is the same issue as #38

The problem is motion-require and circular dependencies, exacerbated by new way High Sierra sorts files. We had a long discussion about this in the RubyMotion meetup the other night. It seems like motion-require is fighting with RubyMotion's own ability to detect circular dependencies by turning app.detect_dependencies = false. We had a sort of general consensus that motion-require should be deprecated, and RubyMotion (which already checks for circular dependencies) will start identifying these, so we can fix them.

Since my app is currently broken pending a fix for #38, I'll take a crack at removing motion-require, and then fixing the load order issues.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

4 participants