Giter VIP home page Giter VIP logo

Comments (15)

rakaramos avatar rakaramos commented on September 10, 2024 1

on a side note, open Xcode via xed . or by double clicking on the Package.swift file, I'm not sure if it will work 100% if you try to generate the xcodeproj file

from muter.

rakaramos avatar rakaramos commented on September 10, 2024 1

What I do is to change the current path to the project that I want to debug.
You can do that in several places, but I think it's easier to do it in main.swift

import class muterCore.Muter
import Foundation

FileManager.default.changeCurrentDirectoryPath("/some/path")

Muter.start()

from muter.

rakaramos avatar rakaramos commented on September 10, 2024

Hi @ArthurBrum!
Could you please give it a try with Xcode 13.4?

I suspect that this error is a linking error with a wrong version of lib_InternalSwiftSyntaxParser.dylib

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

Hi there, sorry for taking this long to answer... I cannot use Xcode 13.4 because we haven't updated our machines to use Mac OS Monterey yet, and this is a requirement for Xcode 13.4

Do you happen to know any other solution @rakaramos ?

from muter.

rakaramos avatar rakaramos commented on September 10, 2024

Gotacha!

In this case, I think the only solution is to change the SwiftSyntax version on the package manifest.

We could probably adopt having semantic package versions in the future, to avoid those breaking changes.

I'm not a homebrew geek, but maybe it's possible to install a specific version of a formulae.

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

Ok, managed to make it work changing version of the swift-syntax in the Package.swift

dependencies: [
    (...)
     .package(name: "SwiftSyntax", url: "https://github.com/apple/swift-syntax.git", .revision("0.50500.0")),

OBS: I'm using Swift 5.5.2, if anyone else tries this, make sure to match swift syntax version looking here:
https://github.com/apple/swift-format/releases

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

And yeah, I'm no homebrew expert either, so the correct fix would be a little tricky :(

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

Yeah... it just succeeded the compilation.. now I'm facing runtime problems.. execution stops and xcode console says:

dyld: Library not loaded: @rpath/lib_InternalSwiftSyntaxParser.dylib
  Referenced from: /Users/arthurbrum/Library/Developer/Xcode/DerivedData/muter-ebzuurlpkixrigcxpuymaerkyier/Build/Products/Debug/muter
  Reason: image not found
(lldb) 

...And trying to solve that I ran
swift package generate-xcodeproj
to generate the muter.xcodeproj and open it...
but then again I get compiling errors of Bundle.module(..) not being found on file
muter/Sources/muterCore/TestReporting/HTML/Resources/BundleResource.swift

yeah... no luck for a while now :(

from muter.

rakaramos avatar rakaramos commented on September 10, 2024

@ArthurBrum are you trying to run muter from Xcode or the Terminal?

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

Oh, sorry, forgot to mention:
When I opened this issue I was just trying to compile and install muter on remote machines (through terminal).

But then I decided to try debug muter, so I started trying to run from xcode on my local machine. So I ran into this same SwiftSyntax error, that's why I continued in the same thread here =/

from muter.

rakaramos avatar rakaramos commented on September 10, 2024

Gotcha!

To debug muter on Xcode, you have to change the Package so the dylib is linked:

isDebuggingMain(false)

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

Nah, no luck.. same error... I believe there's something missing on the configs...

I also tried resetting the repository to main branch before doing what you recommended but now I'm facing a different error.. and xcode won't even let me clean it :(

image

(and trying to auto create schemes is not working either)

from muter.

rakaramos avatar rakaramos commented on September 10, 2024

did you see this?

image

I think you have to change the Package tool version

// swift-tools-version:5.5

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

did you see this?

image

I think you have to change the Package tool version

// swift-tools-version:5.5

Oh, I read that without attention and immediately thought this was related to the Swift-Syntax version... Now replacing swift-tools-version did the trick

from muter.

ArthurBrum avatar ArthurBrum commented on September 10, 2024

Okay, now its compiling and seems to run until it starts looking for the project files... :)

How can I setup muter to run the mutations over a project in another path? To debug it? On readme I found no option for that =/
(I know it's not related to this issue, but I intend to debug muter in more situations like #216 and probably try to fix this brew formulae problem too.. hope I can contribute then! 😊 )

from muter.

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.