johnno1962 / InjectionApp

Issue Tracking Repo for Injection as an App
MIT License
111 stars 7 forks source link

Learnt Compile Failed #16

Open gravicle opened 7 years ago

gravicle commented 7 years ago

Injection fails with error:

*** Learnt compile failed ***

Full Log: https://gist.githubusercontent.com/gravicle/425525cbac31e531d9be3e3edb462de8/raw/35bdf7efe5961ea2f6b33d03e78bc3cd319ce513/InjectionFailure.txt

johnno1962 commented 7 years ago

Burried in the log there is the following. Are you in the middle of editing the project?

/Users/gravicle/Projects/CircleMedicalPatient-iOS/CircleMedicalPatient/App/Messaging/Conversation/MessageCell.swift:74:31: error: 'State' is not a member type of 'Message'fileprivate extension Message.State { ~~~ ^/Users/gravicle/Projects/CircleMedicalPatient-iOS/CircleMedicalPatient/App/Payments/InvoiceContribution+Name.swift:1:19: error: 'Contribution' is not a member type of 'Invoice'extension Invoice.Contribution { ~~~ ^/Users/gravicle/Projects/CircleMedicalPatient-iOS/CircleMedicalPatient/App/Appointments/AppointmentsViewController.swift:9:42: error: 'State' is not a member type of 'Appointment'private typealias ListType = Appointment.State ~~~ ^

gravicle commented 7 years ago

@johno1962 no, not really. Xcode compiles the project without issues. I was testing injection by modifying the value of just one string on a non-final swift class. The rest of the project is in proper state.

johnno1962 commented 7 years ago

Seems to be to do with visibility. Has it taken the -filelist from the wrong module? Have a look at /Users/gravicle/Library/Developer/Xcode/DerivedData/CircleMedicalPatient-gazepgpdyvnfsthbejusiexjjjth/Logs/Build/../iOSInjectionProject/filelist.txt and check if the sources listed are from the correct module.

gravicle commented 7 years ago

@johnno1962 First, sorry for the late reply. The file list looks alright to me. For example, Messages.swift is one of the files Injection complains it cannot find. It's path in filelist.txt is: /Users/gravicle/Projects/CircleMedicalPatient-iOS/CircleMedicalPatient/Domain Models/Messages/Message.swift, which is correct.

johnno1962 commented 7 years ago

Would you be using “module module optimisation”? This doesn’t work alonside injection.

gravicle commented 7 years ago

@johnno1962 I was but I disabled it before trying injection knowing that it can't work with something using Xcode emitted compile commands to go back and recompile. So, right now, these are the settings:

screen shot 2017-03-14 at 2 11 25 pm
gravicle commented 7 years ago

Not sure if that is what you mean, or if I am conflating two different things.

johnno1962 commented 7 years ago

That looks ok to me. I can TeamView if you like.