Skip to content

Parse --no-stdlib from config#88

Merged
Morriar merged 1 commit intomasterfrom
at-config-no-stdlib
Jun 8, 2021
Merged

Parse --no-stdlib from config#88
Morriar merged 1 commit intomasterfrom
at-config-no-stdlib

Conversation

@Morriar
Copy link
Contributor

@Morriar Morriar commented Jun 3, 2021

When computing typing coverage for a project which use --no-stdlib we should pass back this option. Without it, Sorbet will hang or return a bazillion errors.

This PR makes the Config parser recognize --no-stdlib in the config file and generate it when we ask for the options string.

Signed-off-by: Alexandre Terrasa <alexandre.terrasa@shopify.com>
@Morriar Morriar requested a review from a team June 3, 2021 17:16
Copy link
Contributor

@KaanOzkan KaanOzkan left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

What exactly does --no-stdlib do inside Sorbet? Does it not include RBIs on objects from Ruby standard library?

@Morriar
Copy link
Contributor Author

Morriar commented Jun 3, 2021

What exactly does --no-stdlib do inside Sorbet? Does it not include RBIs on objects from Ruby standard library?

By passing --no-stdlib you tell Sorbet to not use the RBI payload for stdlib so you're expected to provide yours as RBI files. We were using this at first in Core as a way to iterate faster. Then we got our changes merged upstream and stopped using this option.

This means that to compute the coverage timeline for the first commits in Core, we need to pass this option of Sorbet tries to load the stdlib RBIs over the payload ones.

@Morriar Morriar merged commit ef93700 into master Jun 8, 2021
@Morriar Morriar deleted the at-config-no-stdlib branch June 8, 2021 13:36
@shopify-shipit shopify-shipit bot temporarily deployed to production July 28, 2021 15:30 Inactive
@shopify-shipit shopify-shipit bot temporarily deployed to production December 8, 2021 21:43 Inactive
@Morriar Morriar added the enhancement New feature or request label Mar 1, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

enhancement New feature or request

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants