Detox icon indicating copy to clipboard operation
Detox copied to clipboard

Add a mechanism to verify cli tools versions compatibility

Open rotemmiz opened this issue 6 years ago • 7 comments

applesimutils is an example for a cli tool that is tightly coupled with Detox, and needs to be synchronized with Detox versions.

We need a way to verify that those cli tools versions are compatible with Detox.

rotemmiz avatar Jun 05 '18 14:06 rotemmiz

Distributing applesimutils with homebrew makes it hard/impossible to set up a test server or development environment in a controlled way. I.e. I'd like to be able to just specify a detox version in my package.json etc., and have the right version of applesimutils installed/used automatically. With homebrew, you generally just get the latest version of applesimutils installed, and it's installed globally, so you can't have multiple copies. Putting Cellar-only executables on the PATH when running detox might work, but it's not easy/possible to convince homebrew to install specific versions, and I'd have to maintain my own detox -> applesimutils version-compatibility map.

If applesimutils were built with npm and there was an npm dependency from the detox npm package to an applesimutils package, this wouldn't be a problem. The detox npm package already invokes xcodebuild, so building applesimutils with npm too should be possible.

Is there a reason why homebrew is used, not npm?

The homebrew recipe doesn't list any dependencies:

https://github.com/wix/homebrew-brew/blob/master/applesimutils.rb

...so it's not that.

jgreen210 avatar Sep 18 '18 14:09 jgreen210

Is moving applesimutils code into detox repo an option? Could then use the detox npm package's postinstall build script to build applesimutils too. If do that:

  • applesimutils is no longer available on its own.
  • It's one less npm package (and maintainer).
  • Would have to merge the two repos' LICENCE files.

jgreen210 avatar Sep 18 '18 16:09 jgreen210

Hmm... @d4vidi, I wonder if we indeed can ship AppleSimUtils as a package, maybe?

noomorph avatar Aug 31 '21 09:08 noomorph

Technically, applesimutils should at all times be backwards compatible (i.e. to older Detox version). Should it not?

d4vidi avatar Aug 31 '21 11:08 d4vidi

@d4vidi except for the cases when Detox relies on a new feature of AppleSimUtils, but the latter is not updated on the user's machine

noomorph avatar Nov 19 '21 12:11 noomorph

But in those cases we assert its version, don't we?

d4vidi avatar Nov 19 '21 14:11 d4vidi

@d4vidi, no. That's the whole point of this issue.

noomorph avatar Nov 19 '21 15:11 noomorph

We need to consider this as a part of the open-source Detox Doctor epic.

noomorph avatar May 22 '23 10:05 noomorph

We need to consider this as a part of the open-source Detox Doctor epic.

@noomorph I like the idea. We'll have to automate it somehow, such that each Detox version could declare the minimally required applesimutils version. On that note, could we make the assertion inside Detox itself, then?

d4vidi avatar May 28 '23 14:05 d4vidi