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

Improve DSL test for custom app_root #1225

Merged
merged 1 commit into from
Oct 13, 2022
Merged

Conversation

andyw8
Copy link
Contributor

@andyw8 andyw8 commented Oct 12, 2022

Motivation

Address feedback in https://github.com/Shopify/tapioca/pull/1220/files#r993606253

Implementation

Write the model files directly rather than having to move them.

Tests

n/a

@andyw8 andyw8 requested a review from KaanOzkan October 12, 2022 16:24
@andyw8 andyw8 marked this pull request as ready for review October 12, 2022 16:26
@andyw8 andyw8 requested a review from a team as a code owner October 12, 2022 16:26
@andyw8
Copy link
Contributor Author

andyw8 commented Oct 12, 2022

There seems to be an unrelated failing test for Rails 6.1:

      it compiles signatures and structs in source files              FAIL (0.87s)
        --- expected
        +++ actual
        @@ -143,7 +143,8 @@
           sig { returns(T::Array[::Integer]) }
           def foo; end
         
        -  def foo=(_arg0); end
        +  sig { params(foo: T::Array[::Integer]).returns(T::Array[::Integer]) }
        +  def foo=(foo); end
         
           sig { override.returns(::Integer) }
           def something; end
        /home/runner/work/tapioca/tapioca/spec/tapioca/gem/pipeline_spec.rb:3008:in `block (2 levels) in <class:PipelineSpec>'

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.

I don't know why the error is happening despite the directory being purged same as before. We can keep the existing solution if it requires a long investigation.

@andyw8
Copy link
Contributor Author

andyw8 commented Oct 12, 2022

Fix in progress for CI: #1226

@vinistock
Copy link
Member

The issue is because there's no Gemfile.lock for the Ruby 2.7 gemfile. This makes it so that we always install the latest versions when running CI and the newest Sorbet version added runtime checks to attribute writers, which changes the expected output. This is also failing in main, so we should fix that, but this PR looks good.

@andyw8 andyw8 enabled auto-merge October 13, 2022 20:09
@andyw8 andyw8 merged commit 9f222d0 into main Oct 13, 2022
@andyw8 andyw8 deleted the andyw8/improve-dsl-spec-test branch October 13, 2022 20:16
@shopify-shipit shopify-shipit bot temporarily deployed to production November 10, 2022 17:34 Inactive
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.

3 participants