Skip to content

Updated GC signatures - #1530

Merged
soutaro merged 1 commit into
ruby:masterfrom
sampersand:swesterman/23-09-06/gc
Mar 18, 2024
Merged

soutaro merged 1 commit into
ruby:masterfrom
sampersand:swesterman/23-09-06/gc

Conversation

@sampersand

@sampersand sampersand commented Sep 20, 2023 •

Copy link
Copy Markdown
Contributor

This pr updates GC's signatures, unit tests, and adds in the Writer test type (which implements _Writer).

Two methods, GC.latest_gc_info and GC.stat technically can accept any hash, and just add their respective keys/values (e.g. [K,V] (Hash[K, V]) -> Hash[K | Symbol, V | Integer]). However, this is currently not testable, and the added complication of supporting it isn't worth the very niche—but technically correct—signature.

In addition to removing the occasional leading ::, this has the following changes:

  • GC::compact_info type alias was added for the return value of GC.compact and other methods
  • GC::{INTERNAL_CONSTANTS,OPTS}: Moved inside the class
  • GC.start: Removed duplicate argument names.
  • GC.stat: Gave actual names to arguments, Hash variant is now nilable.
  • GC.stress: bool not TrueClass | FalseClass
  • GC.stress=: Split Integer and bool cases apart to fix return value.
  • GC.verify_compaction_references: Added optional toward, double_heap and expand_heap keyword arguments
  • GC.latest_gc_info: nil is now accepted, removed K from the Hash[K | Symbol, unty]ed function.
  • GC.garbage_collect: Removed duplicate argument names.
  • GC::Profiler was moved inside the class, and auto_compact-related functions were added.

@sampersand
sampersand force-pushed the swesterman/23-09-06/gc branch 2 times, most recently from a120da7 to 6171416 Compare September 21, 2023 03:10
@sampersand
sampersand marked this pull request as ready for review September 21, 2023 03:11
@sampersand
sampersand force-pushed the swesterman/23-09-06/gc branch from 6171416 to c63a5e1 Compare September 21, 2023 03:13
@sampersand

Copy link
Copy Markdown
Contributor Author

@soutaro
soutaro self-requested a review December 5, 2023 00:33
@soutaro soutaro added this to the RBS 3.4 milestone Dec 5, 2023
@soutaro
soutaro force-pushed the swesterman/23-09-06/gc branch from dea3f9a to dfaec42 Compare December 5, 2023 01:24
@soutaro soutaro modified the milestones: RBS 3.4, RBS 3.5 Dec 14, 2023
@sampersand
sampersand force-pushed the swesterman/23-09-06/gc branch from 05c9850 to d756270 Compare December 26, 2023 23:38
@sampersand
sampersand force-pushed the swesterman/23-09-06/gc branch 5 times, most recently from d1f07ba to 90becea Compare February 8, 2024 03:36

@soutaro soutaro left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍

@soutaro
soutaro force-pushed the swesterman/23-09-06/gc branch from 90becea to e1b95e8 Compare March 18, 2024 05:21
@soutaro
soutaro enabled auto-merge March 18, 2024 05:21
@soutaro
soutaro added this pull request to the merge queue Mar 18, 2024
Merged via the queue into ruby:master with commit 726ced6 Mar 18, 2024
@soutaro soutaro added the Released PRs already included in the released version label Jun 6, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Released PRs already included in the released version

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants