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

Reloading padrino 0.12.2 causes dm-types to lose the UUIDTools::UUID constant #1722

Closed
postmodern opened this Issue Jul 18, 2014 · 8 comments

Comments

Projects
None yet
2 participants
@postmodern
Contributor

postmodern commented Jul 18, 2014

I noticed while using padrino 0.12.2 with DataMapper, models that used the UUID property would cause dm-types to raise a NameError for UUIDTools::UUID when the app reloaded. This does not seem to occur in padrino 0.11.1.

@ujifgc ujifgc added bug labels Jul 18, 2014

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jul 18, 2014

Member

Confirmed. It can be temporarily fixed by require 'uuidtools' in your config/boot.rb.

Member

ujifgc commented Jul 18, 2014

Confirmed. It can be temporarily fixed by require 'uuidtools' in your config/boot.rb.

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jul 19, 2014

Member

Closing in favor of #1723

Member

ujifgc commented Jul 19, 2014

Closing in favor of #1723

@ujifgc ujifgc closed this Jul 19, 2014

ujifgc added a commit that referenced this issue Jul 21, 2014

Merge pull request #1723 from padrino/external-const
do not remove external constants, fixes #1722
@postmodern

This comment has been minimized.

Show comment
Hide comment
@postmodern

postmodern Jul 23, 2014

Contributor

@ujifgc interesting. I thought Bundle.require would require uuidtools?

Contributor

postmodern commented Jul 23, 2014

@ujifgc interesting. I thought Bundle.require would require uuidtools?

@ujifgc ujifgc removed the bug label Jul 23, 2014

@ujifgc ujifgc reopened this Jul 23, 2014

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jul 23, 2014

Member

I will investigate further.

Member

ujifgc commented Jul 23, 2014

I will investigate further.

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jul 24, 2014

Member

It only requires uuidtools/version on Bundler.require. The actual uuidtools gets required by autoloaded dm-types/uuid.

Member

ujifgc commented Jul 24, 2014

It only requires uuidtools/version on Bundler.require. The actual uuidtools gets required by autoloaded dm-types/uuid.

@ujifgc ujifgc closed this Jul 24, 2014

@postmodern

This comment has been minimized.

Show comment
Hide comment
@postmodern

postmodern Jul 24, 2014

Contributor

Ah ha! I also ran into the same problem with JSON. Requiring the dm-types/ file fixed it.

Contributor

postmodern commented Jul 24, 2014

Ah ha! I also ran into the same problem with JSON. Requiring the dm-types/ file fixed it.

@postmodern

This comment has been minimized.

Show comment
Hide comment
@postmodern

postmodern Jul 26, 2014

Contributor

Also just realized that dm-types uses autoload to require the constants. https://github.com/datamapper/dm-types/blob/master/lib/dm-types.rb Is padrino's reloader incompatible with autoload?

Contributor

postmodern commented Jul 26, 2014

Also just realized that dm-types uses autoload to require the constants. https://github.com/datamapper/dm-types/blob/master/lib/dm-types.rb Is padrino's reloader incompatible with autoload?

@ujifgc

This comment has been minimized.

Show comment
Hide comment
@ujifgc

ujifgc Jul 27, 2014

Member

Do you encounter any problems with autoloaded constants after b3a6eb5?

Member

ujifgc commented Jul 27, 2014

Do you encounter any problems with autoloaded constants after b3a6eb5?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment