Skip to content

Conversation

@andynu
Copy link
Contributor

@andynu andynu commented Jun 15, 2022

This appears to fix issue #2256. I believe it should have the same memory implications as the intention in #2199. The type maps are loaded once when they are first called. Only one instance of the mapping is ever created.

Fortunately this was enough to solve the problem, but if there were a need, this could easily be worked into the clear_cache! API to reset it at a later point in the application just by setting the @type_map to nil.

andynu added 2 commits June 15, 2022 12:57
In hopes of allowing the configuration for emulate_booleans to get set
before it is evaluated.
@andynu
Copy link
Contributor Author

andynu commented Jun 15, 2022

This fixes the new test case. And works in my applications. Unfortunately, it also triggers some other test failures. Sadly, without being able to reproduce your test environment locally (https://github.com/yahonda/rails-dev-box/issues/43), I do not have the means to pursue the other test failures.

@andynu andynu force-pushed the lazy-load-type-mappings branch from 6f0ec94 to b7a23d9 Compare June 15, 2022 21:22
@andynu andynu force-pushed the lazy-load-type-mappings branch from b7a23d9 to babe6b7 Compare June 15, 2022 21:28
@yahonda yahonda self-requested a review June 20, 2022 01:11
@yahonda
Copy link
Collaborator

yahonda commented Jul 4, 2022

Would you create a pull request to master branch first? I'll backport it to release70 branch if necessary.

@andynu
Copy link
Contributor Author

andynu commented Jul 4, 2022

Sure. #2300

@andynu andynu closed this Jul 4, 2022
@andynu andynu deleted the lazy-load-type-mappings branch March 19, 2024 01:35
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.

2 participants