Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

check if all required generic arguments are valid #6462

Merged
merged 10 commits into from
Aug 28, 2024

Conversation

xunilrj
Copy link
Contributor

@xunilrj xunilrj commented Aug 23, 2024

Description

This PR fixes #6383, #6390 and #6385.

Checklist

  • I have linked to any relevant issues.
  • I have commented my code, particularly in hard-to-understand areas.
  • I have updated the documentation where relevant (API docs, the reference, and the Sway book).
  • I have added tests that prove my fix is effective or that my feature works.
  • I have added (or requested a maintainer to add) the necessary Breaking* or New Feature labels where relevant.
  • I have done my best to ensure that my PR adheres to the Fuel Labs Code Review Standards.
  • I have requested a review from the relevant team or maintainers.

Copy link

Benchmark for d3873f9

Click to view benchmark
Test Base PR %
code_action 5.5±0.24ms 5.4±0.17ms -1.82%
code_lens 282.7±12.39ns 291.7±7.43ns +3.18%
compile 2.8±0.04s 2.8±0.07s 0.00%
completion 4.9±0.13ms 4.7±0.07ms -4.08%
did_change_with_caching 2.6±0.04s 2.7±0.04s +3.85%
document_symbol 935.6±16.50µs 914.4±35.95µs -2.27%
format 70.4±1.67ms 69.9±0.89ms -0.71%
goto_definition 337.7±5.68µs 341.4±7.90µs +1.10%
highlight 9.4±0.15ms 9.1±0.26ms -3.19%
hover 492.4±7.98µs 492.5±4.65µs +0.02%
idents_at_position 121.1±0.43µs 118.4±0.34µs -2.23%
inlay_hints 648.9±23.45µs 642.0±25.62µs -1.06%
on_enter 2.2±0.14µs 2.0±0.03µs -9.09%
parent_decl_at_position 3.8±0.08ms 3.7±0.03ms -2.63%
prepare_rename 342.0±9.28µs 342.3±9.20µs +0.09%
rename 9.7±0.14ms 9.8±0.19ms +1.03%
semantic_tokens 1174.8±30.53µs 1230.9±16.59µs +4.78%
token_at_position 338.8±3.28µs 343.1±2.20µs +1.27%
tokens_at_position 3.9±0.08ms 3.7±0.14ms -5.13%
tokens_for_file 407.0±3.07µs 407.7±6.72µs +0.17%
traverse 34.2±0.67ms 35.7±1.12ms +4.39%

Copy link

Benchmark for 6cb2643

Click to view benchmark
Test Base PR %
code_action 5.2±0.15ms 5.4±0.17ms +3.85%
code_lens 289.9±13.70ns 287.8±10.65ns -0.72%
compile 2.8±0.09s 2.8±0.04s 0.00%
completion 4.9±0.34ms 4.7±0.08ms -4.08%
did_change_with_caching 2.7±0.07s 2.7±0.06s 0.00%
document_symbol 844.9±12.44µs 876.8±36.46µs +3.78%
format 71.4±0.98ms 71.7±0.98ms +0.42%
goto_definition 338.9±7.04µs 337.1±8.47µs -0.53%
highlight 8.8±0.06ms 9.7±0.26ms +10.23%
hover 503.4±29.73µs 494.3±8.32µs -1.81%
idents_at_position 118.9±0.52µs 118.0±0.82µs -0.76%
inlay_hints 631.9±22.26µs 638.9±17.53µs +1.11%
on_enter 2.1±0.05µs 1882.5±42.90ns -10.36%
parent_decl_at_position 3.6±0.12ms 3.8±0.13ms +5.56%
prepare_rename 342.1±5.58µs 332.5±10.25µs -2.81%
rename 9.5±0.20ms 9.5±0.16ms 0.00%
semantic_tokens 1204.5±12.50µs 1184.1±13.93µs -1.69%
token_at_position 344.1±3.90µs 329.1±2.24µs -4.36%
tokens_at_position 3.6±0.09ms 3.7±0.06ms +2.78%
tokens_for_file 400.4±3.56µs 397.0±2.16µs -0.85%
traverse 35.7±1.06ms 34.4±0.77ms -3.64%

Copy link

Benchmark for d005cb1

Click to view benchmark
Test Base PR %
code_action 5.1±0.20ms 5.2±0.11ms +1.96%
code_lens 282.9±9.55ns 289.1±4.75ns +2.19%
compile 2.7±0.06s 2.7±0.04s 0.00%
completion 4.5±0.01ms 4.7±0.04ms +4.44%
did_change_with_caching 2.5±0.05s 2.6±0.06s +4.00%
document_symbol 847.2±26.64µs 907.9±41.84µs +7.16%
format 70.3±0.76ms 71.0±0.66ms +1.00%
goto_definition 341.4±6.83µs 337.5±9.29µs -1.14%
highlight 8.8±0.13ms 9.0±0.11ms +2.27%
hover 489.4±5.58µs 489.5±7.46µs +0.02%
idents_at_position 117.0±0.60µs 118.5±0.92µs +1.28%
inlay_hints 627.1±22.47µs 639.6±29.89µs +1.99%
on_enter 1867.5±33.26ns 2.2±0.06µs +17.80%
parent_decl_at_position 3.6±0.03ms 3.7±0.04ms +2.78%
prepare_rename 334.2±6.80µs 339.2±7.28µs +1.50%
rename 9.1±0.02ms 9.3±0.02ms +2.20%
semantic_tokens 1238.5±11.28µs 1273.5±15.72µs +2.83%
token_at_position 332.9±2.47µs 335.7±3.17µs +0.84%
tokens_at_position 3.6±0.02ms 3.7±0.03ms +2.78%
tokens_for_file 394.8±2.82µs 399.2±4.91µs +1.11%
traverse 34.3±0.73ms 34.4±1.06ms +0.29%

Copy link

Benchmark for 706087d

Click to view benchmark
Test Base PR %
code_action 5.1±0.08ms 5.1±0.01ms 0.00%
code_lens 288.9±5.85ns 288.0±12.28ns -0.31%
compile 2.7±0.06s 2.8±0.06s +3.70%
completion 4.6±0.05ms 4.6±0.13ms 0.00%
did_change_with_caching 2.6±0.04s 2.8±0.10s +7.69%
document_symbol 897.1±45.92µs 861.9±37.01µs -3.92%
format 75.1±0.90ms 71.3±1.02ms -5.06%
goto_definition 340.5±6.06µs 338.2±6.77µs -0.68%
highlight 8.7±0.14ms 8.8±0.19ms +1.15%
hover 494.7±11.30µs 496.5±8.55µs +0.36%
idents_at_position 117.6±0.62µs 119.5±0.96µs +1.62%
inlay_hints 631.4±18.71µs 638.4±13.28µs +1.11%
on_enter 2.0±0.06µs 1952.1±98.25ns -2.40%
parent_decl_at_position 3.6±0.05ms 3.6±0.03ms 0.00%
prepare_rename 335.7±9.65µs 340.8±4.47µs +1.52%
rename 9.0±0.08ms 9.1±0.15ms +1.11%
semantic_tokens 1221.3±12.86µs 1216.5±9.72µs -0.39%
token_at_position 330.0±4.02µs 336.9±2.85µs +2.09%
tokens_at_position 3.6±0.08ms 3.6±0.04ms 0.00%
tokens_for_file 402.4±2.91µs 405.0±4.43µs +0.65%
traverse 35.2±0.99ms 36.0±0.95ms +2.27%

Copy link

Benchmark for f62fe3d

Click to view benchmark
Test Base PR %
code_action 5.1±0.01ms 5.3±0.07ms +3.92%
code_lens 283.9±7.37ns 287.6±10.09ns +1.30%
compile 2.7±0.05s 2.8±0.04s +3.70%
completion 4.5±0.01ms 4.7±0.05ms +4.44%
did_change_with_caching 2.6±0.05s 2.6±0.03s 0.00%
document_symbol 910.8±41.45µs 908.5±40.70µs -0.25%
format 71.0±1.02ms 72.5±0.88ms +2.11%
goto_definition 346.3±3.51µs 340.5±8.26µs -1.67%
highlight 8.8±0.10ms 9.0±0.02ms +2.27%
hover 501.8±4.20µs 495.4±8.81µs -1.28%
idents_at_position 118.2±0.60µs 117.1±0.37µs -0.93%
inlay_hints 630.1±17.25µs 642.4±24.04µs +1.95%
on_enter 2.0±0.08µs 2.1±0.05µs +5.00%
parent_decl_at_position 3.6±0.04ms 3.7±0.05ms +2.78%
prepare_rename 343.3±13.10µs 341.6±5.13µs -0.50%
rename 9.0±0.14ms 9.4±0.13ms +4.44%
semantic_tokens 1167.8±27.70µs 1251.8±10.05µs +7.19%
token_at_position 335.7±2.88µs 332.0±3.04µs -1.10%
tokens_at_position 3.5±0.03ms 3.7±0.02ms +5.71%
tokens_for_file 398.9±2.52µs 401.0±2.35µs +0.53%
traverse 34.3±0.50ms 34.9±1.01ms +1.75%

@xunilrj xunilrj marked this pull request as ready for review August 28, 2024 07:30
@xunilrj xunilrj requested a review from a team as a code owner August 28, 2024 07:30
Copy link

Benchmark for 4cf51e2

Click to view benchmark
Test Base PR %
code_action 5.1±0.04ms 5.1±0.26ms 0.00%
code_lens 288.6±20.23ns 284.2±9.41ns -1.52%
compile 2.7±0.07s 2.8±0.08s +3.70%
completion 4.5±0.02ms 4.6±0.08ms +2.22%
did_change_with_caching 2.6±0.08s 2.6±0.05s 0.00%
document_symbol 875.9±9.20µs 929.3±31.84µs +6.10%
format 71.0±1.32ms 70.9±1.86ms -0.14%
goto_definition 339.5±8.08µs 343.6±7.96µs +1.21%
highlight 8.8±0.36ms 8.7±0.15ms -1.14%
hover 497.8±6.66µs 497.8±5.41µs 0.00%
idents_at_position 118.3±0.57µs 117.5±0.50µs -0.68%
inlay_hints 621.4±27.72µs 636.1±25.59µs +2.37%
on_enter 2.5±0.10µs 2.1±0.04µs -16.00%
parent_decl_at_position 3.6±0.07ms 3.6±0.04ms 0.00%
prepare_rename 340.0±6.79µs 342.4±7.77µs +0.71%
rename 9.0±0.14ms 9.0±0.02ms 0.00%
semantic_tokens 1252.4±14.00µs 1217.5±12.92µs -2.79%
token_at_position 335.6±2.41µs 344.6±4.32µs +2.68%
tokens_at_position 3.6±0.05ms 3.7±0.09ms +2.78%
tokens_for_file 399.7±4.29µs 401.7±3.18µs +0.50%
traverse 35.2±0.70ms 35.3±1.46ms +0.28%

@IGI-111 IGI-111 requested a review from a team August 28, 2024 18:41
@IGI-111 IGI-111 enabled auto-merge (squash) August 28, 2024 18:51
@IGI-111 IGI-111 merged commit 98877f8 into master Aug 28, 2024
36 checks passed
@IGI-111 IGI-111 deleted the xunilrj/check-generic-args-are-valid branch August 28, 2024 19:16
Copy link

Benchmark for d39f403

Click to view benchmark
Test Base PR %
code_action 5.0±0.12ms 5.3±0.14ms +6.00%
code_lens 285.6±12.46ns 295.9±3.96ns +3.61%
compile 1946.2±67.81ms 1934.8±70.13ms -0.59%
completion 4.4±0.04ms 4.6±0.09ms +4.55%
did_change_with_caching 1863.0±26.68ms 1918.1±38.51ms +2.96%
document_symbol 889.2±31.85µs 895.4±22.35µs +0.70%
format 73.0±1.25ms 72.5±1.06ms -0.68%
goto_definition 341.0±8.79µs 349.0±5.64µs +2.35%
highlight 8.7±0.13ms 9.0±0.15ms +3.45%
hover 352.2±21.00µs 359.7±4.27µs +2.13%
idents_at_position 117.7±1.14µs 117.9±0.47µs +0.17%
inlay_hints 633.9±35.19µs 648.3±22.02µs +2.27%
on_enter 2.1±0.06µs 2.1±0.05µs 0.00%
parent_decl_at_position 3.6±0.05ms 3.7±0.04ms +2.78%
prepare_rename 333.8±4.44µs 353.2±5.36µs +5.81%
rename 9.0±0.10ms 9.5±0.26ms +5.56%
semantic_tokens 1183.4±27.46µs 1230.7±16.43µs +4.00%
token_at_position 339.0±4.21µs 334.5±2.61µs -1.33%
tokens_at_position 3.6±0.04ms 3.7±0.05ms +2.78%
tokens_for_file 395.5±2.70µs 400.9±9.43µs +1.37%
traverse 34.2±0.87ms 34.1±0.75ms -0.29%

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Dangling Generics
3 participants