brew/Library/Homebrew/sorbet/rbi/gems/bootsnap@1.18.3.rbi

653 lines
22 KiB
Plaintext
Raw Normal View History

2021-11-24 18:13:53 +00:00
# typed: true
# DO NOT EDIT MANUALLY
# This is an autogenerated file for types exported from the `bootsnap` gem.
2021-09-17 19:28:50 +01:00
# Please instead update this file by running `bin/tapioca gem bootsnap`.
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/version.rb#3
2021-09-10 21:21:17 +01:00
module Bootsnap
extend ::Bootsnap
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/bundler.rb#6
2021-09-10 21:21:17 +01:00
def bundler?; end
class << self
# source://bootsnap//lib/bootsnap.rb#44
2021-09-10 21:21:17 +01:00
def _instrument(event, path); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#136
2022-01-11 18:11:26 +00:00
def absolute_path?(path); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#82
2021-09-10 21:21:17 +01:00
def default_setup; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#37
2021-09-10 21:21:17 +01:00
def instrumentation=(callback); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#24
2021-09-10 21:21:17 +01:00
def log!; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#14
def log_stats!; end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute logger.
#
# source://bootsnap//lib/bootsnap.rb#12
2021-09-10 21:21:17 +01:00
def logger; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#28
2021-09-10 21:21:17 +01:00
def logger=(logger); end
2023-12-14 15:34:15 +00:00
# Allow the C extension to redefine `rb_get_path` without warning.
# Allow the C extension to redefine `rb_get_path` without warning.
#
# source://bootsnap//lib/bootsnap.rb#144
2022-03-08 18:15:57 +00:00
def rb_get_path(fname); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#48
def setup(cache_dir:, development_mode: T.unsafe(nil), load_path_cache: T.unsafe(nil), ignore_directories: T.unsafe(nil), readonly: T.unsafe(nil), revalidation: T.unsafe(nil), compile_cache_iseq: T.unsafe(nil), compile_cache_yaml: T.unsafe(nil), compile_cache_json: T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#78
def unload_cache!; end
2021-09-10 21:21:17 +01:00
end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/compile_cache.rb#4
2021-09-10 21:21:17 +01:00
module Bootsnap::CompileCache
class << self
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/compile_cache.rb#12
def setup(cache_dir:, iseq:, yaml:, json:, readonly: T.unsafe(nil), revalidation: T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/compile_cache.rb#46
2021-09-10 21:21:17 +01:00
def supported?; end
end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/compile_cache.rb#10
2021-09-10 21:21:17 +01:00
class Bootsnap::CompileCache::Error < ::StandardError; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/compile_cache.rb#5
2022-01-17 18:11:03 +00:00
Bootsnap::CompileCache::UNCOMPILABLE = T.let(T.unsafe(nil), BasicObject)
2021-09-10 21:21:17 +01:00
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#4
2021-09-10 21:21:17 +01:00
module Bootsnap::ExplicitRequire
class << self
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#17
2021-09-10 21:21:17 +01:00
def from_archdir(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#13
2021-09-10 21:21:17 +01:00
def from_rubylibdir(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#9
2021-09-10 21:21:17 +01:00
def from_self(feature); end
2023-12-14 15:34:15 +00:00
# Given a set of gems, run a block with the LOAD_PATH narrowed to include
# only core ruby source paths and these gems -- that is, roughly,
# temporarily remove all gems not listed in this call from the LOAD_PATH.
#
# This is useful before bootsnap is fully-initialized to load gems that it
# depends on, without forcing full LOAD_PATH traversals.
#
# source://bootsnap//lib/bootsnap/explicit_require.rb#27
2021-09-10 21:21:17 +01:00
def with_gems(*gems); end
end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#5
2021-09-10 21:21:17 +01:00
Bootsnap::ExplicitRequire::ARCHDIR = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#7
2021-09-10 21:21:17 +01:00
Bootsnap::ExplicitRequire::DLEXT = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/explicit_require.rb#6
2021-09-10 21:21:17 +01:00
Bootsnap::ExplicitRequire::RUBYLIBDIR = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap.rb#9
2021-09-10 21:21:17 +01:00
class Bootsnap::InvalidConfiguration < ::StandardError; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#4
2021-09-10 21:21:17 +01:00
module Bootsnap::LoadPathCache
class << self
2023-12-14 15:34:15 +00:00
# Returns the value of attribute enabled.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#27
2022-09-08 01:40:44 +01:00
def enabled?; end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute load_path_cache.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#27
2021-09-10 21:21:17 +01:00
def load_path_cache; end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute loaded_features_index.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#27
2021-09-10 21:21:17 +01:00
def loaded_features_index; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#31
def setup(cache_path:, development_mode:, ignore_directories:, readonly: T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#56
2021-09-10 21:21:17 +01:00
def supported?; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#48
2022-09-08 01:40:44 +01:00
def unload!; end
2021-09-10 21:21:17 +01:00
end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#22
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::CACHED_EXTENSIONS = T.let(T.unsafe(nil), Array)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#7
2021-09-10 21:21:17 +01:00
class Bootsnap::LoadPathCache::Cache
2023-12-14 15:34:15 +00:00
# @return [Cache] a new instance of Cache
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#10
2021-09-10 21:21:17 +01:00
def initialize(store, path_obj, development_mode: T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# Try to resolve this feature to an absolute path without traversing the
# loadpath.
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#56
2022-09-08 01:40:44 +01:00
def find(feature); end
2023-12-14 15:34:15 +00:00
# What is the path item that contains the dir as child?
# e.g. given "/a/b/c/d" exists, and the path is ["/a/b"], load_dir("c/d")
# is "/a/b".
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#22
2021-09-10 21:21:17 +01:00
def load_dir(dir); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#116
2021-09-10 21:21:17 +01:00
def push_paths(sender, *paths); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#122
2021-09-10 21:21:17 +01:00
def reinitialize(path_obj = T.unsafe(nil)); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#110
2021-09-10 21:21:17 +01:00
def unshift_paths(sender, *paths); end
private
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#135
2021-09-10 21:21:17 +01:00
def dir_changed?; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#180
2021-09-10 21:21:17 +01:00
def expand_path(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#211
2022-01-17 18:11:03 +00:00
def maybe_append_extension(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#188
2021-09-10 21:21:17 +01:00
def now; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#145
2021-09-10 21:21:17 +01:00
def push_paths_locked(*paths); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#207
2022-09-08 01:40:44 +01:00
def search_index(feature); end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#184
2021-09-10 21:21:17 +01:00
def stale?; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#239
2022-01-17 18:11:03 +00:00
def try_ext(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#219
2022-01-17 18:11:03 +00:00
def try_index(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#163
2021-09-10 21:21:17 +01:00
def unshift_paths_locked(*paths); end
end
2023-12-14 15:34:15 +00:00
# seconds
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#8
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::Cache::AGE_THRESHOLD = T.let(T.unsafe(nil), Integer)
2023-12-14 15:34:15 +00:00
# { 'enumerator' => nil, 'enumerator.so' => nil, ... }
#
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#32
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::Cache::BUILTIN_FEATURES = T.let(T.unsafe(nil), Hash)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/cache.rb#27
Bootsnap::LoadPathCache::Cache::TRUFFLERUBY_LIB_DIR_PREFIX = T.let(T.unsafe(nil), T.untyped)
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#5
2021-09-10 21:21:17 +01:00
module Bootsnap::LoadPathCache::ChangeObserver
class << self
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#65
2022-09-08 01:40:44 +01:00
def register(arr, observer); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#74
2022-09-08 01:40:44 +01:00
def unregister(arr); end
2021-09-10 21:21:17 +01:00
end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#6
2021-09-10 21:21:17 +01:00
module Bootsnap::LoadPathCache::ChangeObserver::ArrayMixin
2023-12-14 15:34:15 +00:00
# For each method that adds items to one end or another of the array
# (<<, push, unshift, concat), override that method to also notify the
# observer of the change.
#
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#10
2021-09-10 21:21:17 +01:00
def <<(entry); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def []=(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15
2021-09-10 21:21:17 +01:00
def append(*entries); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def clear(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#58
def clone; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def collect!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def compact!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#27
2021-09-10 21:21:17 +01:00
def concat(entries); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def delete(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def delete_at(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def delete_if(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#58
def dup; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def fill(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def flatten!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def insert(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def keep_if(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def map!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def pop(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21
2021-09-10 21:21:17 +01:00
def prepend(*entries); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#15
2021-09-10 21:21:17 +01:00
def push(*entries); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def reject!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def replace(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def reverse!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def rotate!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def select!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def shift(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def shuffle!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def slice!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def sort!(*args, &block); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#51
2021-09-10 21:21:17 +01:00
def sort_by!(*args, &block); end
2023-12-14 15:34:15 +00:00
# uniq! keeps the first occurrence of each path, otherwise preserving
# order, preserving the effective load path
#
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#34
2021-09-10 21:21:17 +01:00
def uniq!(*args); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/change_observer.rb#21
2021-09-10 21:21:17 +01:00
def unshift(*entries); end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#16
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::DLEXT = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# This is nil on linux and darwin, but I think it's '.o' on some other
# platform. I'm not really sure which, but it seems better to replicate
# ruby's semantics as faithfully as possible.
#
# source://bootsnap//lib/bootsnap/load_path_cache.rb#20
Bootsnap::LoadPathCache::DLEXT2 = T.let(T.unsafe(nil), T.untyped)
# source://bootsnap//lib/bootsnap/load_path_cache.rb#11
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::DL_EXTENSIONS = T.let(T.unsafe(nil), Array)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#7
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::DOT_RB = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#8
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::DOT_SO = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#5
2022-01-21 18:12:21 +00:00
Bootsnap::LoadPathCache::FALLBACK_SCAN = T.let(T.unsafe(nil), BasicObject)
2021-09-10 21:21:17 +01:00
2023-12-14 15:34:15 +00:00
# LoadedFeaturesIndex partially mirrors an internal structure in ruby that
# we can't easily obtain an interface to.
#
# This works around an issue where, without bootsnap, *ruby* knows that it
# has already required a file by its short name (e.g. require 'bundler') if
# a new instance of bundler is added to the $LOAD_PATH which resolves to a
# different absolute path. This class makes bootsnap smart enough to
# realize that it has already loaded 'bundler', and not just
# '/path/to/bundler'.
#
# If you disable LoadedFeaturesIndex, you can see the problem this solves by:
#
# 1. `require 'a'`
# 2. Prepend a new $LOAD_PATH element containing an `a.rb`
# 3. `require 'a'`
#
# Ruby returns false from step 3.
# With bootsnap but with no LoadedFeaturesIndex, this loads two different
# `a.rb`s.
# With bootsnap and with LoadedFeaturesIndex, this skips the second load,
# returning false like ruby.
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#26
2021-09-10 21:21:17 +01:00
class Bootsnap::LoadPathCache::LoadedFeaturesIndex
2023-12-14 15:34:15 +00:00
# @return [LoadedFeaturesIndex] a new instance of LoadedFeaturesIndex
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#27
2021-09-10 21:21:17 +01:00
def initialize; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#72
2022-01-17 18:11:03 +00:00
def cursor(short); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#78
2022-01-17 18:11:03 +00:00
def identify(short, cursor); end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#68
2021-09-10 21:21:17 +01:00
def key?(feature); end
2023-12-14 15:34:15 +00:00
# We've optimized for initialize and register to be fast, and purge to be tolerable.
# If access patterns make this not-okay, we can lazy-invert the LFI on
# first purge and work from there.
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#54
2021-09-10 21:21:17 +01:00
def purge(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#61
2021-09-10 21:21:17 +01:00
def purge_multi(features); end
2023-12-14 15:34:15 +00:00
# There is a relatively uncommon case where we could miss adding an
# entry:
#
# If the user asked for e.g. `require 'bundler'`, and we went through the
# `FALLBACK_SCAN` pathway in `kernel_require.rb` and therefore did not
# pass `long` (the full expanded absolute path), then we did are not able
# to confidently add the `bundler.rb` form to @lfi.
#
# We could either:
#
# 1. Just add `bundler.rb`, `bundler.so`, and so on, which is close but
# not quite right; or
# 2. Inspect $LOADED_FEATURES upon return from yield to find the matching
# entry.
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#105
2022-01-17 18:11:03 +00:00
def register(short, long); end
2021-09-10 21:21:17 +01:00
private
2023-12-14 15:34:15 +00:00
# Might Ruby automatically search for this extension if
# someone tries to 'require' the file without it? E.g. Ruby
# will implicitly try 'x.rb' if you ask for 'x'.
#
# This is complex and platform-dependent, and the Ruby docs are a little
# handwavy about what will be tried when and in what order.
# So optimistically pretend that all known elidable extensions
# will be tried on all platforms, and that people are unlikely
# to name files in a way that assumes otherwise.
# (E.g. It's unlikely that someone will know that their code
# will _never_ run on MacOS, and therefore think they can get away
# with calling a Ruby file 'x.dylib.rb' and then requiring it as 'x.dylib'.)
#
# See <https://ruby-doc.org/core-2.6.4/Kernel.html#method-i-require>.
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#146
2022-01-17 18:11:03 +00:00
def extension_elidable?(feature); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#150
2022-01-17 18:11:03 +00:00
def strip_extension_if_elidable(feature); end
2021-09-10 21:21:17 +01:00
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/loaded_features_index.rb#129
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::LoadedFeaturesIndex::STRIP_EXTENSION = T.let(T.unsafe(nil), Regexp)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#7
2021-09-10 21:21:17 +01:00
class Bootsnap::LoadPathCache::Path
2023-12-14 15:34:15 +00:00
# @return [Path] a new instance of Path
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#24
2022-03-08 18:15:57 +00:00
def initialize(path, real: T.unsafe(nil)); end
2021-09-10 21:21:17 +01:00
2023-12-14 15:34:15 +00:00
# Return a list of all the requirable files and all of the subdirectories
# of this +Path+.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#59
2021-09-10 21:21:17 +01:00
def entries_and_dirs(store); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#82
2021-09-10 21:21:17 +01:00
def expanded_path; end
2023-12-14 15:34:15 +00:00
# True if the path exists, but represents a non-directory object
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#47
2021-09-10 21:21:17 +01:00
def non_directory?; end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute path.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#22
2021-09-10 21:21:17 +01:00
def path; end
2023-12-14 15:34:15 +00:00
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#53
2021-09-10 21:21:17 +01:00
def relative?; end
2023-12-14 15:34:15 +00:00
# A path is considered 'stable' if it is part of a Gem.path or the ruby
# distribution. When adding or removing files in these paths, the cache
# must be cleared before the change will be noticed.
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#11
2021-09-10 21:21:17 +01:00
def stable?; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#29
2022-03-08 18:15:57 +00:00
def to_realpath; end
2023-12-14 15:34:15 +00:00
# A path is considered volatile if it doesn't live under a Gem.path or
# the ruby distribution root. These paths are scanned for new additions
# more frequently.
#
# @return [Boolean]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#18
2021-09-10 21:21:17 +01:00
def volatile?; end
private
2023-12-14 15:34:15 +00:00
# last time a directory was modified in this subtree. +dirs+ should be a
# list of relative paths to directories under +path+. e.g. for /a/b and
# /a/b/c, pass ('/a/b', ['c'])
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#99
2021-09-10 21:21:17 +01:00
def latest_mtime(path, dirs); end
2023-12-14 15:34:15 +00:00
# (expensive) returns [entries, dirs]
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#92
2021-09-10 21:21:17 +01:00
def scan!; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#123
2021-09-10 21:21:17 +01:00
def stability; end
end
2023-12-14 15:34:15 +00:00
# Built-in ruby lib stuff doesn't change, but things can occasionally be
# installed into sitedir, which generally lives under rubylibdir.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#120
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::Path::RUBY_LIBDIR = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#121
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::Path::RUBY_SITEDIR = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# a Path can be either stable of volatile, depending on how frequently we
# expect its contents may change. Stable paths aren't rescanned nearly as
# often.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#115
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::Path::STABLE = T.let(T.unsafe(nil), Symbol)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path.rb#116
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::Path::VOLATILE = T.let(T.unsafe(nil), Symbol)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#7
2021-09-10 21:21:17 +01:00
module Bootsnap::LoadPathCache::PathScanner
class << self
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#23
2021-09-10 21:21:17 +01:00
def call(path); end
2023-12-14 15:34:15 +00:00
# Returns the value of attribute ignored_directories.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21
def ignored_directories; end
2023-12-14 15:34:15 +00:00
# Sets the attribute ignored_directories
#
# @param value the value to set the attribute ignored_directories to.
#
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#21
def ignored_directories=(_arg0); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#69
2021-09-10 21:21:17 +01:00
def os_path(path); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#49
2021-09-10 21:21:17 +01:00
def walk(absolute_dir_path, relative_dir_path, &block); end
end
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#10
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::PathScanner::ALTERNATIVE_NATIVE_EXTENSIONS_PATTERN = T.let(T.unsafe(nil), Regexp)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#12
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::PathScanner::BUNDLE_PATH = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#9
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::PathScanner::NORMALIZE_NATIVE_EXTENSIONS = T.let(T.unsafe(nil), TrueClass)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/path_scanner.rb#8
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::PathScanner::REQUIRABLE_EXTENSIONS = T.let(T.unsafe(nil), Array)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache.rb#9
2021-09-10 21:21:17 +01:00
Bootsnap::LoadPathCache::SLASH = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#9
2021-09-10 21:21:17 +01:00
class Bootsnap::LoadPathCache::Store
2023-12-14 15:34:15 +00:00
# @return [Store] a new instance of Store
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#16
def initialize(store_path, readonly: T.unsafe(nil)); end
2021-09-10 21:21:17 +01:00
2023-12-14 15:34:15 +00:00
# @raise [SetOutsideTransactionNotAllowed]
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#28
2021-09-10 21:21:17 +01:00
def fetch(key); end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#24
2021-09-10 21:21:17 +01:00
def get(key); end
2023-12-14 15:34:15 +00:00
# @raise [SetOutsideTransactionNotAllowed]
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#40
2021-09-10 21:21:17 +01:00
def set(key, value); end
2023-12-14 15:34:15 +00:00
# @raise [NestedTransactionError]
#
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#49
2021-09-10 21:21:17 +01:00
def transaction; end
private
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#66
2021-09-10 21:21:17 +01:00
def commit_transaction; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#112
2022-01-11 18:11:26 +00:00
def default_data; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#95
2021-09-10 21:21:17 +01:00
def dump_data; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#73
2021-09-10 21:21:17 +01:00
def load_data; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#61
2022-03-08 18:15:57 +00:00
def mark_for_mutation!; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#116
2022-03-08 18:15:57 +00:00
def mkdir_p(path); end
2021-09-10 21:21:17 +01:00
end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#11
2022-01-11 18:11:26 +00:00
Bootsnap::LoadPathCache::Store::CURRENT_VERSION = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#13
2021-09-10 21:21:17 +01:00
class Bootsnap::LoadPathCache::Store::NestedTransactionError < ::StandardError; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#14
2021-09-10 21:21:17 +01:00
class Bootsnap::LoadPathCache::Store::SetOutsideTransactionNotAllowed < ::StandardError; end
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/load_path_cache/store.rb#10
2022-01-11 18:11:26 +00:00
Bootsnap::LoadPathCache::Store::VERSION_KEY = T.let(T.unsafe(nil), String)
2023-12-14 15:34:15 +00:00
# source://bootsnap//lib/bootsnap/version.rb#4
2021-09-10 21:21:17 +01:00
Bootsnap::VERSION = T.let(T.unsafe(nil), String)