Sha256: bec7580dbc298a3086cf293a8dbb05a4e852fbcdd76827786f25b662fca4d1b2

Contents?: true

Size: 1014 Bytes

Versions: 5

Compression:

Stored size: 1014 Bytes

Contents

# typed: strict
# frozen_string_literal: true

require "spoom/sorbet/config"
require "spoom/sorbet/errors"
require "spoom/sorbet/lsp"
require "spoom/sorbet/metrics"
require "spoom/sorbet/sigils"

require "open3"

module Spoom
  module Sorbet
    class Error < StandardError
      extend T::Sig

      class Killed < Error; end
      class Segfault < Error; end

      sig { returns(ExecResult) }
      attr_reader :result

      sig do
        params(
          message: String,
          result: ExecResult,
        ).void
      end
      def initialize(message, result)
        super(message)

        @result = result
      end
    end

    CONFIG_PATH = "sorbet/config"
    GEM_PATH = T.let(Gem::Specification.find_by_name("sorbet-static").full_gem_path, String)
    GEM_VERSION = T.let(Gem::Specification.find_by_name("sorbet-static-and-runtime").version.to_s, String)
    BIN_PATH = T.let((Pathname.new(GEM_PATH) / "libexec" / "sorbet").to_s, String)

    KILLED_CODE = 137
    SEGFAULT_CODE = 139
  end
end

Version data entries

5 entries across 5 versions & 1 rubygems

Version Path
spoom-1.3.2 lib/spoom/sorbet.rb
spoom-1.3.1 lib/spoom/sorbet.rb
spoom-1.3.0 lib/spoom/sorbet.rb
spoom-1.2.4 lib/spoom/sorbet.rb
spoom-1.2.3 lib/spoom/sorbet.rb