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

[GR-18163] Implement thread-safe autoloading #3078

Open
wants to merge 19 commits into
base: master
Choose a base branch
from

Commits on Jun 12, 2023

  1. Pass the AutoloadConstant to setConstantInternal()

    * Do not use the RubyConstant#value field to store the path for an autoload,
      it is already stored in the AutoloadConstant.
    * Now it is clear the RubyConstant#value is null for an autoload.
    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    bfa68bf View commit details
    Browse the repository at this point in the history
  2. Configuration menu
    Copy the full SHA
    e13ae6c View commit details
    Browse the repository at this point in the history
  3. Implement thread-safe autoloading

    * We stash the value of the constant being autoloaded in AutoloadConstant
      and only publish it once the autoload ends.
    * Fixes #2431
      and #3040
    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f718287 View commit details
    Browse the repository at this point in the history
  4. Copy RubyConstant objects on Module#dup

    * Necessary to pass the cleaned-up spec in this commit.
    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    ac8067b View commit details
    Browse the repository at this point in the history
  5. Configuration menu
    Copy the full SHA
    1351309 View commit details
    Browse the repository at this point in the history
  6. Configuration menu
    Copy the full SHA
    80eb385 View commit details
    Browse the repository at this point in the history
  7. Configuration menu
    Copy the full SHA
    3bf93a8 View commit details
    Browse the repository at this point in the history
  8. Configuration menu
    Copy the full SHA
    fb34cc3 View commit details
    Browse the repository at this point in the history
  9. Configuration menu
    Copy the full SHA
    88924ec View commit details
    Browse the repository at this point in the history
  10. Configuration menu
    Copy the full SHA
    6ee8d87 View commit details
    Browse the repository at this point in the history
  11. Improve autoload specs

    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    f94c490 View commit details
    Browse the repository at this point in the history
  12. Remove the constant if an autoload fails

    * Previously it would be undefined but this behavior was changed in 3.1:
      https://bugs.ruby-lang.org/issues/15790
    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    71c0c68 View commit details
    Browse the repository at this point in the history
  13. Configuration menu
    Copy the full SHA
    3298f49 View commit details
    Browse the repository at this point in the history
  14. Configuration menu
    Copy the full SHA
    4a24507 View commit details
    Browse the repository at this point in the history
  15. Configuration menu
    Copy the full SHA
    18eaa06 View commit details
    Browse the repository at this point in the history
  16. Improve Kernel.autoload specs

    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5c3b401 View commit details
    Browse the repository at this point in the history
  17. Configuration menu
    Copy the full SHA
    3c5d0d1 View commit details
    Browse the repository at this point in the history
  18. Configuration menu
    Copy the full SHA
    7dceedd View commit details
    Browse the repository at this point in the history
  19. Style

    eregon committed Jun 12, 2023
    Configuration menu
    Copy the full SHA
    5c2eedb View commit details
    Browse the repository at this point in the history