Git Product home page Git Product logo

Comments (21)

lanzelot1989 avatar lanzelot1989 commented on July 30, 2024 2

+1
Hey, is there any new information on that? Using fbsimctl via Homebrew would be a huge timesaver for us.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024 1

This is now merged you have to brew tap facebook/fb first to get the formulas from the Facebook tap, then just brew install fbsimctl. Must be run with Xcode 7.1 or greater. Will not build on Xcode 8 until the Swift source is migrated.

from idb.

gblotter avatar gblotter commented on July 30, 2024

+1

from idb.

tapthaker avatar tapthaker commented on July 30, 2024

+1

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

WIP gist of how far I currently am. I can easily create and install the framework, but the build of fbsimctl fails with xcodebuild as it can't find the FBSimulatorControl module when compiling the fbsimclt target.

Current plan is to:

  1. Build the FBSimulatorControl Framework target
  2. Install it with the Homebrew API
  3. Build fbsimctl.
  4. Use install_name_tool to modify the rpath of the fbsimctl binary to include the install path of the FBSimulatorControl framework.
  5. Install the binary with the Homebrew API.

from idb.

tapthaker avatar tapthaker commented on July 30, 2024

I will take up the task of installing fbsimctl with the Homebrew API.

from idb.

tapthaker avatar tapthaker commented on July 30, 2024

Modified the Formula that you have given, you can find it here , however, facing some problems while modifying the rpath.

Also how do we generally proceed with brew formula ? Should I send a pull request to this Repo or should I directly send a pull request to HomeBrew.

from idb.

tapthaker avatar tapthaker commented on July 30, 2024

Updated the above referenced gist, was able to install it 😎 . Let me know about how do you want to integrate with the repo, or do i directly submit it to homebrew.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

Awesome Work πŸ‘!

Also how do we generally proceed with brew formula ? Should I send a pull request to this Repo or should I directly send a pull request to HomeBrew.

Opening a PR in this repo with the formula in the fbsimctl directory. It means that we can review the changes in a PR for this repo and have a canonical source until this gets merged into the true Homebrew formula repo.

You should probably also open a PR on the Homebrew repo. Homebrew prefer formulas that aren't submitted by the 'owner'. You'll also be able to get feedback on the acceptability of the formula.

You will want to confirm whether you can rely on the derivedData location rather than fixing the underlying issue. I've grepped the Homebrew repo and can't find that this is used before. All of the formulas that use xcodebuild use SYMROOT and DSTROOT. I would imagine this has something to do with how Homebrew approaches sandboxing. I understand that you were probably hitting the same build issue that I was when building the fbsimctl scheme, but this may be a requirement that is necessary for a homebrew formula.

One of the requirements for a homebrew formula is a tagged version, which we do not currently have. There's a number of tasks that need finishing before I'm happy to tag a provisional version #70. I think we can get to this place pretty soon, but I'm sure it's possible to run from a forked homebrew with --head until that point.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

It looks like -derivedDataPath foobar will work in place of SYMROOT=foobar to make the build directory relative to the checkout. I'm looking to tag a v0.1 once there's some more documentation for fbsimctl.

from idb.

odlp avatar odlp commented on July 30, 2024

@tapthaker I was trying out the latest version of your gist formula (thanks!) but can't install fbsimctl.

When the xcodebuild config is release (as per the gist) I get the following issue:

** BUILD FAILED **


The following build commands failed:
    CompileC derivedData/Build/Intermediates/FBSimulatorControl.build/Release/XCTestBootstrap.build/Objects-normal/x86_64/XCTestBootstrapFrameworkLoader.o XCTestBootstrap/Utility/XCTestBootstrapFrameworkLoader.m normal x86_64 objective-c com.apple.compilers.llvm.clang.1_0.compiler
(1 failure)

With the debug config I get an error about Swifter missing (presumably because there's no Carthage bootstrap step):


/tmp/fbsimctl-20160531-39335-adas5y/FBSimulatorControl-master/fbsimctl/FBSimulatorControlKit/Sources/HttpRelay.swift:12:8: error: no such module 'Swifter'
import Swifter
       ^

** BUILD FAILED **


The following build commands failed:
    CompileSwift normal x86_64 /tmp/fbsimctl-20160531-39335-adas5y/FBSimulatorControl-master/fbsimctl/FBSimulatorControlKit/Sources/CLI.swift
    CompileSwift normal x86_64 /tmp/fbsimctl-20160531-39335-adas5y/FBSimulatorControl-master/fbsimctl/FBSimulatorControlKit/Sources/CommandBuffer.swift
    CompileSwift normal x86_64 /tmp/fbsimctl-20160531-39335-adas5y/FBSimulatorControl-master/fbsimctl/FBSimulatorControlKit/Sources/Arguments.swift
    CompileSwift normal x86_64 /tmp/fbsimctl-20160531-39335-adas5y/FBSimulatorControl-master/fbsimctl/FBSimulatorControlKit/Sources/Environment.swift
    CompileSwiftSources normal x86_64 com.apple.xcode.tools.swift.compiler
(5 failures)

Any ideas what I'm doing wrong?

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

@odlp you're correct. Swifter is a dependency of fbsimctl (needed to provide the HTTP Server).

There have been some changes FBSimulatorControl builds, which means you'll just need fbsimctl to have the @rpath to FBSimulatorControlKit. FBSimulatorControlKit is now the only dependency of fbsimctl, as long as it can be dynamically linked then you should be golden.

from idb.

odlp avatar odlp commented on July 30, 2024

@lawrencelomax thanks for the tip, I'll give that a try!

from idb.

tapthaker avatar tapthaker commented on July 30, 2024

Updated the formula.

Swifter is a dependency that gets installed using Carthage

Turns out I had to change rpath for FBControlCore & XCTestBootstrap as well. If only we can bundle these frameworks into the FBSimulatorControlKit.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

Turns out I had to change rpath for FBControlCore & XCTestBootstrap as well. If only we can bundle these frameworks into the FBSimulatorControlKit

I have something locally for doing this, it's just a matter of adding them to the bundled FBSimulatorControlKit and they will then exist on the @rpath

from idb.

tapthaker avatar tapthaker commented on July 30, 2024

Hey, @lawrencelomax let me know when this is done. I will submit the formula to homebrew after that.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

@lanzelot1989 I have a formula ready. I just need to update the README, tag a version and then get it merged.

I'll probably have it merged to the facebook tap for the time being.

from idb.

lanzelot1989 avatar lanzelot1989 commented on July 30, 2024

Doing God's work. Is there a documentation available for the parameters of fbsimctl?

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

Is there a documentation available for the parameters of fbsimctl?

That's where finishing up the README comes in! If you want something to look at immediately, there are unit tests for the CLI parsers.

I'm also building out an e2e test suite in Python for testing the cli, with some additional logging it could provide some good usage examples.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

I have a pull request that I'll update with the appropriate hashes and will tag a release once I land some imminent documentation changes.

from idb.

lawrencelomax avatar lawrencelomax commented on July 30, 2024

This is now documented in the fbsimctl readme. Have Fun!

from idb.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.