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

[3.x] Can't resolve apollo-testing-support:3.0.0-beta01 #3459

Closed
ychescale9 opened this issue Oct 27, 2021 · 5 comments
Closed

[3.x] Can't resolve apollo-testing-support:3.0.0-beta01 #3459

ychescale9 opened this issue Oct 27, 2021 · 5 comments

Comments

@ychescale9
Copy link
Contributor

Summary
There seems to be some publishing issue with 3.0.0-beta01?

Version
3.0.0-beta01

Description
After updating to 3.0.0-beta01 I can no longer resolve the apollo-testing-support dependency:

 > Could not resolve com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01.
     Required by:
         project :project-name
      > No matching variant of com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01 was found. The consumer was configured to find a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native', attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64' but:
          - Variant 'appleApiElements-published' capability com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01 declares a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native':
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'macos_x64' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.native.target' with value 'ios_x64'
          - Variant 'jsApiElements-published' capability com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01 declares a usage of 'kotlin-api' of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
          - Variant 'jsRuntimeElements-published' capability com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01:
              - Incompatible because this component declares a usage of 'kotlin-runtime' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'js' and the consumer needed a usage of 'kotlin-api' of a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
          - Variant 'jvmApiElements-published' capability com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01 declares an API of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
          - Variant 'jvmRuntimeElements-published' capability com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01 declares a runtime of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'jvm' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')
          - Variant 'metadataApiElements' capability com.apollographql.apollo3:apollo-testing-support:3.0.0-beta01 declares a usage of 'kotlin-api' of a component:
              - Incompatible because this component declares a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'common' and the consumer needed a component, as well as attribute 'org.jetbrains.kotlin.platform.type' with value 'native'
              - Other compatible attribute:
                  - Doesn't say anything about org.jetbrains.kotlin.native.target (required 'ios_x64')

Possibly related to the new JS target?

@martinbonnin
Copy link
Contributor

martinbonnin commented Oct 27, 2021

Hi 👋 ! Indeed that would be related to this change.

I'm curious why you need apollo-testing-support though? apollo-testing-support is more or less an internal testing artifact that get published part of the overall project publication but I didn't expect anyone to depend on it.

@ychescale9
Copy link
Contributor Author

I'm using these in my tests:

import com.apollographql.apollo3.testing.enqueue
import com.apollographql.apollo3.testing.runWithMainLoop

But maybe I can just use apollo-mockserver?

@martinbonnin
Copy link
Contributor

martinbonnin commented Oct 27, 2021

runWithMainLoop (now renamed runTest) is in apollo-testing-support indeed. If you want to run your tests on iOS that will be helpful. We'll add that back in beta02 next week.

Out of curiosity, did you consider running your tests on macOSX64 instead? This is what we do (and why this wasn't caught). It runs faster and doesn't require an emulator. In the event of a crash, we get a core dump on the host machine directly and can even use lldb if required. I haven't found a case where testing on iOS would catch something that wasn't caught on macOSX64 but maybe I'm missing something?

@ychescale9
Copy link
Contributor Author

Thanks!

No I haven't considered running tests on macOSX64. What you described sounds like a win so I'll try it out 😄

@martinbonnin
Copy link
Contributor

Fixed with beta02

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

No branches or pull requests

2 participants