Sha256: ba901ce05dff97201104bfc62ebdebbc0255c8570c2f8691edbc11037e026da7

Contents?: true

Size: 907 Bytes

Versions: 3

Compression:

Stored size: 907 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)
    BIN_PATH = T.let((Pathname.new(GEM_PATH) / "libexec" / "sorbet").to_s, String)

    KILLED_CODE = 137
    SEGFAULT_CODE = 139
  end
end

Version data entries

3 entries across 3 versions & 1 rubygems

Version Path
spoom-1.2.2 lib/spoom/sorbet.rb
spoom-1.2.1 lib/spoom/sorbet.rb
spoom-1.2.0 lib/spoom/sorbet.rb