Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
459 commits
Select commit Hold shift + click to select a range
c35d6a7
Drop another @sg-ignore
apiology Sep 30, 2025
73e21c8
Merge remote-tracking branch 'origin/master' into fix_gates_in_arg_types
apiology Sep 30, 2025
7cba7ca
Bump for call.rb complexity
apiology Sep 30, 2025
053de42
Merge remote-tracking branch 'origin/master' into method_pin
apiology Sep 30, 2025
2d154ca
Merge remote-tracking branch 'origin/master' into generic_typecheckin…
apiology Sep 30, 2025
470c26e
Mark spec as now working
apiology Sep 30, 2025
523ca94
Merge remote-tracking branch 'origin/master' into try_again_removing_…
apiology Sep 30, 2025
56a5588
Merge remote-tracking branch 'origin/master' into stricter_unions
apiology Sep 30, 2025
06eade6
Drop sg-ignores
apiology Sep 30, 2025
d486e64
Trim more matrix entries to make room for solargraph-rspec specs
apiology Oct 1, 2025
56342d4
Fix version number
apiology Oct 1, 2025
df0c1db
Merge remote-tracking branch 'lekemula/enable-solargraph-rspec-plugin…
apiology Oct 1, 2025
152dbdf
Annotation fixes for strong typechecking
apiology Oct 5, 2025
94e650b
Annotation fixes
apiology Oct 5, 2025
aa566bc
Merge branch 'handle_more_typechecking_self_situations' into run_stri…
apiology Oct 9, 2025
eb1de22
Merge branch 'overcommit_yardoc_bundle_fix' into run_strict_typecheck…
apiology Oct 9, 2025
7bdfa26
Merge branch 'drop_broken_namespaces_method' into run_strict_typechec…
apiology Oct 9, 2025
dfe6996
Merge branch 'try_again_removing_node_modules_stubs' into run_strict_…
apiology Oct 9, 2025
b2e4954
Merge branch 'annotations_2025' into run_strict_typechecking_in_ci
apiology Oct 9, 2025
2240ad7
Add @sg-ignores for issues covered by future PRs
apiology Oct 9, 2025
b0fb367
Add @sg-ignores for issues covered by future PRs
apiology Oct 9, 2025
1a2a546
Add future specs
apiology Oct 9, 2025
6a95643
Rename method
apiology Oct 9, 2025
84ac4ed
Add false_presences arguments
apiology Oct 9, 2025
5753e8f
Generalize some methods for future expansion
apiology Oct 9, 2025
9aea987
Handle simple 'if foo.nil?' cases
apiology Oct 10, 2025
1f47ac7
Merge branch 'reduce_num_of_buid_jobs' into flow_sensitive_typing_2_0
apiology Oct 10, 2025
82e5bbf
Handle 'if foo' in flow-sensitive typing
apiology Oct 11, 2025
a30c1e6
Set up flow-sensitive typing specs, currently passing and pending
apiology Oct 11, 2025
c6c96e3
Remove nilness in 'foo unless foo.nil? || foo'
apiology Oct 11, 2025
ab404c8
Handle foo if unrelated && foo
apiology Oct 11, 2025
b20ad1e
Handle 'break if foo.nil?'
apiology Oct 11, 2025
b0a7294
Handle 'if foo ... else foo'
apiology Oct 11, 2025
9cba783
Refactor
apiology Oct 11, 2025
3e678e1
Support 'if foo.nil?' when 'foo' has more than one lvar pin
apiology Oct 11, 2025
7b7c640
Support 'return if foo.nil?'
apiology Oct 12, 2025
88156b4
Support 'return foo unless !foo'
apiology Oct 12, 2025
5d1e9ae
Support 'return if foo.nil?'
apiology Oct 12, 2025
0456bd9
Support 'foo = nilable || not_nilable'
apiology Oct 12, 2025
9c6c1c1
Drop 'pending's which are already working
apiology Oct 12, 2025
10e7306
Handle 'foo = nilable_local || non_nilable' scenarios
apiology Oct 12, 2025
6f5d60a
Handle 'while foo'
apiology Oct 12, 2025
82183e4
Handle 'foo unless unrelated || repr.nil?
apiology Oct 15, 2025
1a4ef78
Use presence information to improve local variable type probing
apiology Oct 22, 2025
8a8469e
Fix issues from typechecking in CI
apiology Oct 22, 2025
c29deaf
Fix type issue
apiology Oct 22, 2025
4608872
Fix RuboCop issue
apiology Oct 22, 2025
350b01e
Deal with issue seen in typechecking
apiology Oct 22, 2025
6e0fc44
Set default on parameter for solargraph-rails compatibility
apiology Oct 23, 2025
c9abf56
Set default on parameter for solargraph-rails compatibility
apiology Oct 23, 2025
39704a0
Force build
apiology Oct 23, 2025
bba54e7
Add missing-but-probably-needed method
apiology Oct 24, 2025
7b8f56d
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Oct 24, 2025
77e760d
Merge branch 'flow_sensitive_typing_2_0' into union_type_enforcement_…
apiology Oct 25, 2025
8a0bf22
Fix merge issues
apiology Oct 25, 2025
1cda7ac
Fix merge issues
apiology Oct 25, 2025
41e7d49
Add @sg-ignore
apiology Oct 25, 2025
d49c3f1
Merge branch 'handle_more_typechecking_self_situations' into union_ty…
apiology Oct 25, 2025
545ca32
Fix @sg-ignore issues
apiology Oct 25, 2025
e619c0b
Merge branch 'fix_gates_in_arg_types' into union_type_enforcement_base
apiology Oct 25, 2025
64c94b4
Fix merge issue
apiology Oct 25, 2025
dd1b0c2
Adjust RuboCop todo
apiology Oct 25, 2025
0139b69
Merge branch 'overcommit_yardoc_bundle_fix' into union_type_enforceme…
apiology Oct 25, 2025
b495c06
Merge branch 'run_strict_typechecking_in_ci' into union_type_enforcem…
apiology Oct 25, 2025
63a2e22
Merge branch 'stricter_unions' into union_type_enforcement_base
apiology Oct 25, 2025
05f1c1e
Fix merge issue
apiology Oct 25, 2025
1d63a0d
Fix merge issue
apiology Oct 25, 2025
36273f4
Fix merge issue
apiology Oct 25, 2025
a36cadc
Swap ivar expectations
apiology Oct 25, 2025
1bae34b
Fix merge issue
apiology Oct 25, 2025
104f8ab
Add probe method
apiology Oct 25, 2025
6151cb7
Fix merge issue
apiology Oct 25, 2025
9e2ba8a
Fix merge issue
apiology Oct 25, 2025
f72e4a0
Drop @sg-ignores
apiology Oct 25, 2025
8e0bf1a
Add spec for is_a? in a "break unless" statement
apiology Oct 25, 2025
5cdedb8
Fix merge issue
apiology Oct 25, 2025
97ffc4b
Add missing loose_unions location
apiology Oct 25, 2025
60fb1cb
Move to enforcement at alpha level for now
apiology Oct 25, 2025
670cede
Merge branch 'stricter_unions' into union_type_enforcement_base
apiology Oct 25, 2025
2263c95
Fix type issues
apiology Oct 25, 2025
47c4720
Fix solargraph-rspec issues
apiology Oct 25, 2025
a998a85
Merge remote-tracking branch 'lekemula/enable-solargraph-rspec-plugin…
apiology Oct 25, 2025
f51954a
Allow filename to be nil for solargraph-rspec specs
apiology Oct 25, 2025
0cfcd63
Merge remote-tracking branch 'lekemula/enable-solargraph-rspec-plugin…
apiology Oct 25, 2025
0834ab1
Add pending flag
apiology Oct 25, 2025
105a2c4
Use appraisal gem while running solargraph-rspec specs
apiology Oct 5, 2025
d3c0185
Use appraisal gem while running solargraph-rspec specs
apiology Oct 5, 2025
e376dc5
Use appraisal gem while running solargraph-rspec specs
apiology Oct 5, 2025
a3ed92e
Spec updates
apiology Oct 25, 2025
4baadb5
Keep typechecking Ruby versions the same
apiology Oct 25, 2025
da508cb
Annotation fixes
apiology Oct 26, 2025
7ba09ab
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Oct 26, 2025
6ba6100
Annotation fixes
apiology Oct 26, 2025
e15c04d
Fix issue with &.
apiology Oct 26, 2025
1ea7e1e
Merge branch 'flow_sensitive_typing_2_0' into union_type_enforcement_…
apiology Oct 26, 2025
c03d238
Fix merge
apiology Oct 26, 2025
cf9a72a
Drop accidental file add
apiology Oct 26, 2025
6ff7332
Remove @sg-ignore
apiology Oct 26, 2025
08816d8
Drop unused file
apiology Oct 26, 2025
911970d
Merge branch 'flow_sensitive_typing_2_0' into union_type_enforcement_…
apiology Oct 26, 2025
27cd225
Ensure nullable? is on both UniqueType and ComplexType
apiology Oct 26, 2025
57883f6
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Oct 26, 2025
89cd8b9
Refactor
apiology Oct 31, 2025
6b2afc9
Fix comment style
apiology Oct 31, 2025
3d39026
Update Gemfile.lock in solargraph-rspec
apiology Oct 31, 2025
bd075c5
Drop @sg-ignore
apiology Oct 31, 2025
6319630
Update Gemfile.lock in solargraph-rspec
apiology Oct 31, 2025
1b12f8f
Update Gemfile.lock in solargraph-rspec
apiology Oct 31, 2025
8c5c5fb
Better handling of 'return if'
apiology Oct 31, 2025
aff5fbf
Better handling of 'case when'
apiology Oct 31, 2025
04c61ff
Merge branch 'flow_sensitive_typing_2_0' into union_type_enforcement_…
apiology Oct 31, 2025
9bc22d4
Drop @sg-ignore
apiology Nov 1, 2025
ba66987
Support intersection types
apiology Nov 1, 2025
ec07372
Merge branch 'intersection_types' into union_type_enforcement_base
apiology Nov 1, 2025
e584d33
Fix up param type
apiology Nov 1, 2025
077ddd9
Fix merge
apiology Nov 1, 2025
5108fa1
Merge branch 'intersection_types' into flow_sensitive_typing_2_0
apiology Nov 1, 2025
bfe7f4e
Add downcast method, another falsey type
apiology Nov 1, 2025
19a81fe
Fix types
apiology Nov 1, 2025
090099b
Fix types
apiology Nov 1, 2025
89c0b4e
Merge branch 'flow_sensitive_typing_2_0' into union_type_enforcement_…
apiology Nov 2, 2025
a2cffcc
Fix tags
apiology Nov 2, 2025
8e4c28e
Merge branch 'flow_sensitive_typing_2_0' into union_type_enforcement_…
apiology Nov 2, 2025
b78965b
Don't set binder to avoid trigger solargraph-rspec bug
apiology Nov 3, 2025
4ef2dc6
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Nov 3, 2025
ed23813
Reproduce solargraph-rspec rspec failure
apiology Nov 3, 2025
769041b
Add set -x to debug
apiology Nov 3, 2025
a4ad163
Use a Ruby version tested by solargraph-rspec
apiology Nov 3, 2025
e6dcf09
Mark item fixed
apiology Nov 3, 2025
340f11c
Merge branch 'reduce_num_of_buid_jobs' into local_variable_probiing
apiology Nov 3, 2025
c5df696
Add appraisal workaround
apiology Nov 3, 2025
7cefc1c
Add resgression spec
apiology Nov 3, 2025
cccd47a
Fix solargraph-rspec specs
apiology Nov 12, 2025
d8ef859
Fix RuboCop issues
apiology Nov 12, 2025
f7bc624
Use dev branch for solargraph-rspec for now
apiology Nov 12, 2025
461ab2d
Fix GHA
apiology Nov 12, 2025
b71a184
Fix linting issues
apiology Nov 12, 2025
9a4b889
Add solargraph update
apiology Nov 12, 2025
069ce93
Fix appraisal in plugins.yml
apiology Nov 12, 2025
fae78ad
Catch Gem::Requirement::BadRequirementError
apiology Nov 12, 2025
cb4e7ac
Merge branch 'method_pin' into local_variable_probiing
apiology Nov 12, 2025
0d877a4
Bump Ruy versioin for solargraph-rspec
apiology Nov 12, 2025
f886fed
Fix build failure via rubygems update
apiology Nov 12, 2025
331f56b
Bump rspec-rails just as solargraph-rails' GHA does
apiology Nov 12, 2025
7021433
Fix merge
apiology Nov 12, 2025
3161f91
Clarify expectation of instance variable lookup from context, but
apiology Nov 12, 2025
a3fc979
Remove unneeded changes
apiology Nov 13, 2025
54b65b8
Drop Block's binder param
apiology Nov 14, 2025
dc5237b
Drop Method's binder param
apiology Nov 14, 2025
cdc6de7
Drop binder
apiology Nov 14, 2025
f2db365
Drop binder
apiology Nov 14, 2025
786375e
Drop closure rebinding
apiology Nov 14, 2025
17b120b
Drop reset_generated!
apiology Nov 14, 2025
62a447c
Drop binder
apiology Nov 14, 2025
379daf2
Document logic
apiology Nov 14, 2025
fc4f00f
Use reset_generated! instead, so future cases are handled
apiology Nov 14, 2025
7be2cd1
Revert refactor
apiology Nov 14, 2025
401b3e6
Reformat
apiology Nov 14, 2025
a7cc436
Fix solargraph-rspec specs
apiology Nov 15, 2025
fd463fe
Try rubygems: latest
apiology Nov 15, 2025
8bbd6f5
Fix new Ruby 4.x issue
apiology Nov 15, 2025
cd2fd9a
Fix new Ruby 4.x issue
apiology Nov 15, 2025
ce65d5f
Separate out possible bug reproduction from original purpose of spec
apiology Nov 15, 2025
c6dbe4d
Trigger build
apiology Nov 15, 2025
9d26863
Fix new bundler issue
apiology Nov 15, 2025
87ec9b3
Debug
apiology Nov 15, 2025
6a14bd7
Turn off warning diagnostics in CLI
apiology Nov 15, 2025
5348f70
Merge branch 'method_pin' into solargraph_rspec_failure
apiology Nov 15, 2025
7e7604b
Debug
apiology Nov 15, 2025
91d3cd4
Fix pin merging bug
apiology Nov 15, 2025
652fcd2
Add @sg-ignore
apiology Nov 15, 2025
74c3ec1
Merge branch 'solargraph_rspec_failure' into intersection_types
apiology Nov 15, 2025
b80f846
Merge branch 'solargraph_rspec_failure' into union_type_enforcement_base
apiology Nov 15, 2025
8359d06
Merge branch 'solargraph_rspec_failure' into run_strict_typechecking_…
apiology Nov 15, 2025
a066a8b
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Nov 16, 2025
fe06cf3
Add @sg-ignore
apiology Nov 16, 2025
9b6aa30
Pull in solargraph-rspec fixes from another branch
apiology Nov 16, 2025
19eae82
Drop @sg-ignores
apiology Nov 16, 2025
482671b
Add @sg-ignore
apiology Nov 16, 2025
82c5680
Merge branch 'annotations_2025' into run_strict_typechecking_in_ci
apiology Nov 16, 2025
1af7057
Merge branch 'solargraph_rspec_failure' into annotations_2025
apiology Nov 16, 2025
b1d0b21
Drop @sg-ignore
apiology Nov 16, 2025
973b512
Use consistent ruby versions for typechecking
apiology Nov 16, 2025
52894d9
Merge branch 'intersection_types' into union_type_enforcement_base
apiology Nov 16, 2025
5b7c980
Merge branch 'run_strict_typechecking_in_ci' into union_type_enforcem…
apiology Nov 16, 2025
390d68a
Remove @sg-ignores
apiology Nov 16, 2025
f9114dc
Add @sg-ignores
apiology Nov 16, 2025
680638d
Adjust @sg-ignores
apiology Nov 16, 2025
6f2e8bb
Restore @sg-ignores
apiology Nov 16, 2025
4f94ef8
Fix issue revealed by this PR's change
apiology Nov 16, 2025
35d8cfb
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Nov 16, 2025
c7028dc
Mark spec as pending
apiology Nov 16, 2025
0d854cd
Mark spec as pending
apiology Nov 16, 2025
f8ded08
Add @sg-ignores
apiology Nov 16, 2025
ec29b25
Drop dead code
apiology Nov 16, 2025
8590b21
Merge branch 'intersection_types' into union_type_enforcement_base
apiology Nov 16, 2025
4d0366b
Use latest rubygems
apiology Nov 16, 2025
963c135
Remove unused file
apiology Nov 16, 2025
3e2a67c
Merge branch 'solargraph_rspec_failure' into remove_dead_file
apiology Nov 16, 2025
86f3ca2
Merge branch 'remove_dead_file' into union_type_enforcement_base
apiology Nov 16, 2025
2df9fb5
Merge branch 'solargraph_rspec_failure' into flow_sensitive_typing_2_0
apiology Nov 16, 2025
5b63c53
Merge branch 'stricter_unions' into or_support_in_flow_sensitive_typing
apiology Nov 16, 2025
a12d959
Add failing spec
apiology Nov 16, 2025
71f0e74
Add implementation
apiology Nov 16, 2025
a0b3b62
Merge branch 'or_support_in_flow_sensitive_typing' into union_type_en…
apiology Nov 16, 2025
7bb3e34
Merge branch 'local_variable_probiing' into or_support_in_flow_sensit…
apiology Nov 16, 2025
a7b7833
Fix @sg-ignore issues
apiology Nov 16, 2025
b524eec
Fix solargraph-rails specs issue
apiology Nov 16, 2025
5e5b6e5
Drop workaround
apiology Nov 16, 2025
72a57a0
Merge branch 'local_variable_probiing' into or_support_in_flow_sensit…
apiology Nov 16, 2025
1d7106e
Use is_a? in a simple if() with a union to refine types
apiology Nov 16, 2025
ef9f25e
Merge branch 'or_support_in_flow_sensitive_typing' into union_type_en…
apiology Nov 16, 2025
2547145
Fix specs
apiology Nov 16, 2025
7a742df
Merge branch 'overcommit_yardoc_bundle_fix' into or_support_in_flow_s…
apiology Nov 16, 2025
5c18f4b
Merge branch 'or_support_in_flow_sensitive_typing' into union_type_en…
apiology Nov 16, 2025
c411211
Use same ruby version for all typechecking for consistency
apiology Nov 16, 2025
9c8ed51
Rename rule to match future PR
apiology Nov 16, 2025
5e03ba9
Merge branch 'solargraph_rspec_failure' into stricter_unions
apiology Nov 16, 2025
b5c656d
Merge branch 'stricter_unions' into union_type_enforcement_base
apiology Nov 16, 2025
7ea7bfd
Fix polarity
apiology Nov 16, 2025
c300b4b
Merge branch 'stricter_unions' into union_type_enforcement_base
apiology Nov 16, 2025
41adab4
Fix type issue combining directives
apiology Nov 24, 2025
f9ec724
Pull in additional build fix
apiology Nov 24, 2025
b32ee88
Merge branch 'solargraph_rspec_failure' into fix_directive_combinatio…
apiology Nov 24, 2025
5609ca9
Merge branch 'fix_directive_combination_issue' into union_type_enforc…
apiology Nov 24, 2025
08626af
Push logic up to BaseVariable for future expansion
apiology Nov 27, 2025
803974b
Merge branch 'local_variable_probiing' into union_type_enforcement_base
apiology Nov 27, 2025
9ec6433
Merge fix
apiology Nov 27, 2025
8e2a094
Fix merge
apiology Nov 27, 2025
6e558b7
Avoid ignoring valid pins in typechecking
apiology Nov 28, 2025
7ed9e03
Merge branch 'solargraph_rspec_failure' into ignored_pins_issue
apiology Nov 28, 2025
890d638
Fix newly found type issue
apiology Nov 28, 2025
40f547f
Annotations needed after https://github.com/castwide/solargraph/pull/…
apiology Nov 28, 2025
62d44c9
Merge branch 'annotations_2025' into run_strict_typechecking_in_ci
apiology Nov 28, 2025
70cc611
Merge branch 'ignored_pins_issue' into run_strict_typechecking_in_ci
apiology Nov 28, 2025
1594b95
Annotations needed after https://github.com/castwide/solargraph/pull/…
apiology Nov 28, 2025
1b1b69e
Merge branch 'annotations_2025' into run_strict_typechecking_in_ci
apiology Nov 28, 2025
ce40539
Merge branch 'run_strict_typechecking_in_ci' into union_type_enforcem…
apiology Nov 28, 2025
405d9be
Handle a self resolution case
apiology Nov 28, 2025
a1836e8
Merge branch 'intersection_types' into union_type_enforcement_base
apiology Nov 28, 2025
5a4aae2
Drop @sg-ignores
apiology Nov 29, 2025
f74a49d
Add missing spec after experiencing subtle merge error
apiology Nov 29, 2025
b289374
Merge branch 'or_support_in_flow_sensitive_typing' into union_type_en…
apiology Nov 29, 2025
1401373
Fix type
apiology Nov 29, 2025
9bd0ebe
Merge branch 'annotations_2025' into union_type_enforcement_base
apiology Nov 29, 2025
d27a522
Fix annotations
apiology Nov 29, 2025
8701af7
Handle an issue brought out by future merge
apiology Nov 29, 2025
f4e2b3e
Merge branch 'intersection_types' into union_type_enforcement_base
apiology Nov 29, 2025
08024bd
Fixes based on future branch type checking
apiology Nov 29, 2025
7fba8bb
Merge branch 'intersection_types' into union_type_enforcement_base
apiology Nov 29, 2025
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
92 changes: 62 additions & 30 deletions .github/workflows/plugins.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,7 +23,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: 3.4 # keep same as typecheck.yml
bundler-cache: true
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand All @@ -43,7 +43,7 @@ jobs:
- name: Install gem types
run: bundle exec rbs collection update
- name: Ensure typechecking still works
run: bundle exec solargraph typecheck --level typed
run: bundle exec solargraph typecheck --level strong
- name: Ensure specs still run
run: bundle exec rake spec
rails:
Expand All @@ -54,7 +54,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: 3.4 # keep same as typecheck.yml
bundler-cache: false
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand All @@ -72,7 +72,7 @@ jobs:
- name: Install gem types
run: bundle exec rbs collection update
- name: Ensure typechecking still works
run: bundle exec solargraph typecheck --level typed
run: bundle exec solargraph typecheck --level strong
- name: Ensure specs still run
run: bundle exec rake spec
rspec:
Expand All @@ -83,7 +83,7 @@ jobs:
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.0'
ruby-version: 3.4 # keep same as typecheck.yml
bundler-cache: false
- uses: awalsh128/cache-apt-pkgs-action@latest
with:
Expand All @@ -101,34 +101,64 @@ jobs:
- name: Install gem types
run: bundle exec rbs collection update
- name: Ensure typechecking still works
run: bundle exec solargraph typecheck --level typed
run: bundle exec solargraph typecheck --level strong
- name: Ensure specs still run
run: bundle exec rake spec

# run_solargraph_rspec_specs:
# # check out solargraph-rspec as well as this project, and point the former to use the latter as a local gem
# runs-on: ubuntu-latest
# steps:
# - uses: actions/checkout@v3
# - name: clone https://github.com/lekemula/solargraph-rspec/
# run: |
# cd ..
# git clone https://github.com/lekemula/solargraph-rspec.git
# cd solargraph-rspec
# - name: Set up Ruby
# uses: ruby/setup-ruby@v1
# with:
# ruby-version: '3.0'
# bundler-cache: false
# - name: Install gems
# run: |
# cd ../solargraph-rspec
# echo "gem 'solargraph', path: '../solargraph'" >> Gemfile
# bundle install
# - name: Run specs
# run: |
# cd ../solargraph-rspec
# bundle exec rake spec
run_solargraph_rspec_specs:
# check out solargraph-rspec as well as this project, and point the former to use the latter as a local gem
runs-on: ubuntu-latest
env:
SOLARGRAPH_CACHE: ${{ github.workspace }}/../solargraph-rspec/vendor/solargraph/cache
BUNDLE_PATH: ${{ github.workspace }}/../solargraph-rspec/vendor/bundle
steps:
- uses: actions/checkout@v3
- name: clone https://github.com/lekemula/solargraph-rspec/
run: |
cd ..
git clone https://github.com/lekemula/solargraph-rspec.git
cd solargraph-rspec
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
rubygems: latest
bundler-cache: false
- name: Install gems
run: |
set -x

cd ../solargraph-rspec
echo "gem 'solargraph', path: '../solargraph'" >> Gemfile
bundle config path ${{ env.BUNDLE_PATH }}
bundle install --jobs 4 --retry 3
bundle exec appraisal install
# @todo some kind of appraisal/bundle conflict?
# https://github.com/castwide/solargraph/actions/runs/19038710934/job/54369767122?pr=1116
# /home/runner/work/solargraph/solargraph-rspec/vendor/bundle/ruby/3.1.0/gems/bundler-2.6.9/lib/bundler/runtime.rb:317:in
# `check_for_activated_spec!': You have already activated date
# 3.5.0, but your Gemfile requires date 3.4.1. Prepending
# `bundle exec` to your command may solve
# this. (Gem::LoadError)
bundle exec appraisal update date
# For some reason on ruby 3.1 it defaults to an old version: 1.3.2
# https://github.com/lekemula/solargraph-rspec/actions/runs/17814581205/job/50645370316?pr=22
# We update manually to the latest
bundle exec appraisal update rspec-rails
- name: Configure .solargraph.yml
run: |
cd ../solargraph-rspec
cp .solargraph.yml.example .solargraph.yml
- name: Solargraph generate RSpec gems YARD and RBS pins
run: |
cd ../solargraph-rspec
bundle exec appraisal rbs collection update
rspec_gems=$(bundle exec appraisal ruby -r './lib/solargraph-rspec' -e 'puts Solargraph::Rspec::Gems.gem_names.join(" ")' 2>/dev/null | tail -n1)
bundle exec appraisal solargraph gems $rspec_gems
- name: Run specs
run: |
cd ../solargraph-rspec
bundle exec appraisal rspec --format progress

run_solargraph_rails_specs:
# check out solargraph-rails as well as this project, and point the former to use the latter as a local gem
Expand All @@ -146,6 +176,8 @@ jobs:
# solargraph-rails supports Ruby 3.0+
ruby-version: '3.0'
bundler-cache: false
# https://github.com/apiology/solargraph/actions/runs/19400815835/job/55508092473?pr=17
rubygems: latest
bundler: latest
env:
MATRIX_RAILS_VERSION: "7.0"
Expand Down
38 changes: 36 additions & 2 deletions .github/workflows/rspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,18 +23,47 @@ jobs:
matrix:
ruby-version: ['3.0', '3.1', '3.2', '3.3', '3.4', 'head']
rbs-version: ['3.6.1', '3.9.4', '4.0.0.dev.4']
# Ruby 3.0 doesn't work with RBS 3.9.4 or 4.0.0.dev.4
exclude:
# Ruby 3.0 doesn't work with RBS 3.9.4 or 4.0.0.dev.4
- ruby-version: '3.0'
rbs-version: '3.9.4'
- ruby-version: '3.0'
rbs-version: '4.0.0.dev.4'
# only include the 3.1 variants we include later
- ruby-version: '3.1'
# only include the 3.2 variants we include later
- ruby-version: '3.2'
# only include the 3.3 variants we include later
- ruby-version: '3.3'
# only include the 3.4 variants we include later
- ruby-version: '3.4'
# Missing require in 'rbs collection update' - hopefully
# fixed in next RBS release
- ruby-version: 'head'
rbs-version: '4.0.0.dev.4'
- ruby-version: 'head'
rbs-version: '3.9.4'
- ruby-version: 'head'
rbs-version: '3.6.1'
include:
- ruby-version: '3.1'
rbs-version: '3.6.1'
- ruby-version: '3.2'
rbs-version: '3.9.4'
- ruby-version: '3.3'
rbs-version: '4.0.0.dev.4'
- ruby-version: '3.4'
rbs-version: '4.0.0.dev.4'
steps:
- uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: ${{ matrix.ruby-version }}
# see https://github.com/castwide/solargraph/actions/runs/19391419903/job/55485410493?pr=1119
#
# match version in Gemfile.lock and use same version below
bundler: 2.5.23
bundler-cache: false
- name: Set rbs version
run: echo "gem 'rbs', '${{ matrix.rbs-version }}'" >> .Gemfile
Expand All @@ -46,8 +75,13 @@ jobs:
run: echo "gem 'tsort'" >> .Gemfile
- name: Install gems
run: |
bundle install
bundle _2.5.23_ install
bundle update rbs # use latest available for this Ruby version
bundle list
bundle exec solargraph pin 'Bundler::Dsl#source'
- name: Update types
run: |
bundle exec rbs collection update
- name: Run tests
run: bundle exec rake spec
undercover:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/typecheck.yml
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ permissions:

jobs:
solargraph_typed:
name: Solargraph / typed
name: Solargraph / strong

runs-on: ubuntu-latest

Expand All @@ -36,4 +36,4 @@ jobs:
- name: Install gem types
run: bundle exec rbs collection install
- name: Typecheck self
run: SOLARGRAPH_ASSERTS=on bundle exec solargraph typecheck --level typed
run: SOLARGRAPH_ASSERTS=on bundle exec solargraph typecheck --level strong
59 changes: 16 additions & 43 deletions .rubocop_todo.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ Gemspec/OrderedDependencies:
# Configuration parameters: Severity.
Gemspec/RequireMFA:
Exclude:
- 'solargraph.gemspec'
- 'spec/fixtures/rdoc-lib/rdoc-lib.gemspec'
- 'spec/fixtures/rubocop-custom-version/specifications/rubocop-0.0.0.gemspec'

Expand Down Expand Up @@ -216,11 +215,6 @@ Layout/SpaceAfterComma:
Layout/SpaceAroundEqualsInParameterDefault:
Enabled: false

# This cop supports safe autocorrection (--autocorrect).
Layout/SpaceAroundKeyword:
Exclude:
- 'spec/rbs_map/conversions_spec.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowForAlignment, EnforcedStyleForExponentOperator, EnforcedStyleForRationalLiterals.
# SupportedStylesForExponentOperator: space, no_space
Expand Down Expand Up @@ -458,7 +452,7 @@ Metrics/AbcSize:
# Configuration parameters: CountComments, CountAsOne, AllowedMethods, AllowedPatterns, inherit_mode.
# AllowedMethods: refine
Metrics/BlockLength:
Max: 54
Max: 57

# Configuration parameters: CountBlocks, CountModifierForms.
Metrics/BlockNesting:
Expand All @@ -469,6 +463,7 @@ Metrics/ClassLength:
Exclude:
- 'lib/solargraph/api_map.rb'
- 'lib/solargraph/language_server/host.rb'
- 'lib/solargraph/pin/method.rb'
- 'lib/solargraph/rbs_map/conversions.rb'
- 'lib/solargraph/type_checker.rb'

Expand Down Expand Up @@ -624,7 +619,6 @@ RSpec/ExampleWording:
# This cop supports safe autocorrection (--autocorrect).
RSpec/ExcessiveDocstringSpacing:
Exclude:
- 'spec/rbs_map/conversions_spec.rb'
- 'spec/source/chain/call_spec.rb'

# This cop supports safe autocorrection (--autocorrect).
Expand All @@ -640,21 +634,10 @@ RSpec/ExpectActual:
RSpec/HookArgument:
Enabled: false

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: .
# SupportedStyles: is_expected, should
RSpec/ImplicitExpect:
EnforcedStyle: should

# Configuration parameters: AssignmentOnly.
RSpec/InstanceVariable:
Enabled: false

# This cop supports safe autocorrection (--autocorrect).
RSpec/LeadingSubject:
Exclude:
- 'spec/rbs_map/conversions_spec.rb'

RSpec/LeakyConstantDeclaration:
Exclude:
- 'spec/complex_type_spec.rb'
Expand All @@ -664,14 +647,6 @@ RSpec/LetBeforeExamples:
Exclude:
- 'spec/complex_type_spec.rb'

# Configuration parameters: EnforcedStyle.
# SupportedStyles: have_received, receive
RSpec/MessageSpies:
Exclude:
- 'spec/doc_map_spec.rb'
- 'spec/language_server/host/diagnoser_spec.rb'
- 'spec/language_server/host/message_worker_spec.rb'

RSpec/MissingExampleGroupArgument:
Exclude:
- 'spec/diagnostics/rubocop_helpers_spec.rb'
Expand Down Expand Up @@ -732,10 +707,6 @@ RSpec/ScatteredLet:
Exclude:
- 'spec/complex_type_spec.rb'

RSpec/StubbedMock:
Exclude:
- 'spec/language_server/host/message_worker_spec.rb'

# Configuration parameters: IgnoreNameless, IgnoreSymbolicNames.
RSpec/VerifiedDoubles:
Enabled: false
Expand Down Expand Up @@ -773,7 +744,6 @@ Style/AndOr:
# RedundantBlockArgumentNames: blk, block, proc
Style/ArgumentsForwarding:
Exclude:
- 'lib/solargraph/api_map.rb'
- 'lib/solargraph/complex_type.rb'

# This cop supports safe autocorrection (--autocorrect).
Expand Down Expand Up @@ -955,7 +925,6 @@ Style/MapIntoArray:
Exclude:
- 'lib/solargraph/diagnostics/update_errors.rb'
- 'lib/solargraph/parser/parser_gem/node_chainer.rb'
- 'lib/solargraph/type_checker/param_def.rb'

# This cop supports unsafe autocorrection (--autocorrect-all).
Style/MapToHash:
Expand Down Expand Up @@ -1029,7 +998,6 @@ Style/Next:
- 'lib/solargraph/parser/parser_gem/node_processors/send_node.rb'
- 'lib/solargraph/pin/signature.rb'
- 'lib/solargraph/source_map/clip.rb'
- 'lib/solargraph/type_checker/checks.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: Strict, AllowedNumbers, AllowedPatterns.
Expand Down Expand Up @@ -1166,7 +1134,12 @@ Style/SlicingWithRange:
# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowModifier.
Style/SoleNestedConditional:
Enabled: false
Exclude:
- 'lib/solargraph/complex_type/unique_type.rb'
- 'lib/solargraph/pin/parameter.rb'
- 'lib/solargraph/source.rb'
- 'lib/solargraph/source/source_chainer.rb'
- 'lib/solargraph/type_checker.rb'

# This cop supports safe autocorrection (--autocorrect).
Style/StderrPuts:
Expand All @@ -1188,7 +1161,6 @@ Style/StringLiterals:
# This cop supports safe autocorrection (--autocorrect).
Style/SuperArguments:
Exclude:
- 'lib/solargraph/pin/base_variable.rb'
- 'lib/solargraph/pin/callable.rb'
- 'lib/solargraph/pin/method.rb'
- 'lib/solargraph/pin/signature.rb'
Expand Down Expand Up @@ -1230,7 +1202,13 @@ Style/TrailingCommaInArrayLiteral:
# Configuration parameters: EnforcedStyleForMultiline.
# SupportedStylesForMultiline: comma, consistent_comma, diff_comma, no_comma
Style/TrailingCommaInHashLiteral:
Enabled: false
Exclude:
- 'lib/solargraph/pin/base_variable.rb'
- 'lib/solargraph/pin/callable.rb'
- 'lib/solargraph/pin/closure.rb'
- 'lib/solargraph/pin/parameter.rb'
- 'lib/solargraph/pin/local_variable.rb'
- 'lib/solargraph/rbs_map/conversions.rb'

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: ExactNameMatch, AllowPredicates, AllowDSLWriters, IgnoreClassMethods, AllowedMethods.
Expand Down Expand Up @@ -1278,12 +1256,7 @@ YARD/MismatchName:
Enabled: false

YARD/TagTypeSyntax:
Exclude:
- 'lib/solargraph/api_map/constants.rb'
- 'lib/solargraph/language_server/host.rb'
- 'lib/solargraph/parser/comment_ripper.rb'
- 'lib/solargraph/pin/method.rb'
- 'lib/solargraph/type_checker.rb'
Enabled: false

# This cop supports safe autocorrection (--autocorrect).
# Configuration parameters: AllowHeredoc, AllowURI, AllowQualifiedName, URISchemes, IgnoreCopDirectives, AllowedPatterns, SplitStrings.
Expand Down
Loading
Loading