Code Monkey home page Code Monkey logo

Comments (14)

johnno1962 avatar johnno1962 commented on June 4, 2024 1

Ahhhh, ObjectiveC! I've uploaded a new pre-release with your fix. Thanks @qmkCamel!

https://github.com/johnno1962/InjectionIII/releases/tag/4.8.4RC2

from injectioniii.

johnno1962 avatar johnno1962 commented on June 4, 2024 1

Good point, I've updated the release candidate, now build #8005.

from injectioniii.

micyx avatar micyx commented on June 4, 2024

I have the same problem!Not solved.

from injectioniii.

johnno1962 avatar johnno1962 commented on June 4, 2024

HI, did it work before with the same project or do you think this is a new problem specific to Xcode 15.3?

from injectioniii.

micyx avatar micyx commented on June 4, 2024

HI, did it work before with the same project or do you think this is a new problem specific to Xcode 15.3?

I went back to Xcode 15.2 and it worked!

from injectioniii.

MsterLiNing avatar MsterLiNing commented on June 4, 2024

HI, did it work before with the same project or do you think this is a new problem specific to Xcode 15.3?

Yes, our project used to work normally. Since updating xcode to 15.3 the day before yesterday, it cannot be used normally.

from injectioniii.

johnno1962 avatar johnno1962 commented on June 4, 2024

Hi, apologies for the delay getting back this morning. I've noticed recently Xcode is no longer logging all commands in a build but only those that were necessary (files that changed and their dependents etc.) InjectionII parses these build logs (.xcactivity files) to know how to recompile a file and if it doesn't find them you get the message you seen. The way to resolve this could be to do a clean build then the compilation commands for all files should be logged again. If you close and open a project only the last log file is kept so you may have to do this again some times. Injection also keeps a cache in /tmp once a file has been injected successfully so the picture may seem unpredictable. The cache is cleared when you reboot or there is a compilation error (Clearing out the cache completely when a file fails to compile was one of the changes in 1.8.3).

from injectioniii.

MsterLiNing avatar MsterLiNing commented on June 4, 2024

Hi, apologies for the delay getting back this morning. I've noticed recently Xcode is no longer logging all commands in a build but only those that were necessary (files that changed and their dependents etc.) InjectionII parses these build logs (.xcactivity files) to know how to recompile a file and if it doesn't find them you get the message you seen. The way to resolve this could be to do a clean build then the compilation commands for all files should be logged again. If you close and open a project only the last log file is kept so you may have to do this again some times. Injection also keeps a cache in /tmp once a file has been injected successfully so the picture may seem unpredictable. The cache is cleared when you reboot or there is a compilation error (Clearing out the cache completely when a file fails to compile was one of the changes in 1.8.3).

I performed a clean build operation, but the error persists. I restarted Xcode and also restarted the computer, but the error still persists.The following is the log in command.sh.

search through build logs, most recent first

cd "/Users//Library/Developer/Xcode/DerivedData/MyProjectName-dwtohbpjfizdzbaxydtsgfzpobmx/Logs/Build" &&
for log in ls -t *.xcactivitylog; do
#echo "Scanning $log"
/usr/bin/env perl "/Users/
/Library/Containers/com.johnholdsworth.InjectionIII/Data/tmp/eval101.pl" "$log" >"/Users//Library/Containers/com.johnholdsworth.InjectionIII/Data/tmp/eval101.sh" 2>"/Users//Library/Containers/com.johnholdsworth.InjectionIII/Data/tmp/eval101.err" && exit 0
done
exit 1;

from injectioniii.

johnno1962 avatar johnno1962 commented on June 4, 2024

Are there any files in /Users//Library/Developer/Xcode/DerivedData/MyProjectName-dwtohbpjfizdzbaxydtsgfzpobmx/Logs/Build?

from injectioniii.

johnno1962 avatar johnno1962 commented on June 4, 2024

This is most strange. I've been using Xcode 15.3 for a while and cleaned down derived data and retried and injection was working. The log scan is delegated to the script it mentions which would normally print out the compile command. If you could trace through that to try to get to the bottom of the problem that would help. Otherwise is TeamViewing an option?

from injectioniii.

hnzlk2014 avatar hnzlk2014 commented on June 4, 2024

I have the same problem!

from injectioniii.

johnno1962 avatar johnno1962 commented on June 4, 2024

I've produced a new release candidate with improved logging if someone would like to try it out and let me know if if provides any more information https://github.com/johnno1962/InjectionIII/releases/tag/4.8.4RC1

from injectioniii.

qmkCamel avatar qmkCamel commented on June 4, 2024

The xcactivitylog has changed since 15.3, so the grep log failed.

The following code is a test command when I delete the line https://github.com/johnno1962/HotReloading/blob/82e4ea05a4a1f5fa41439dab5b520b9b944749f0/Sources/HotReloading/SwiftEval.swift#L918

/Applications/Xcode.app/Contents/Developer/Toolchains/XcodeDefault.xctoolchain/usr/bin/clang -x objective-c -ivfsstatcache /Users/edge/Library/Developer/Xcode/DerivedData/SDKStatCaches.noindex/iphoneos17.4-21E210-99a79c02cfa501706f5b564e46d84afe.sdkstatcache -fmessage-length\=0 -fdiagnostics-show-note-include-stack -fmacro-backtrace-limit\=0 -fno-color-diagnostics -fmodules-prune-interval\=86400 -fmodules-prune-after\=345600 -fbuild-session-file\=/Users/edge/Library/Developer/Xcode/DerivedData/ModuleCache.noindex/Session.modulevalidation -fmodules-validate-once-per-build-session -Wnon-modular-include-in-framework-module -Werror\=non-modular-include-in-framework-module -Wno-trigraphs -Wno-missing-field-initializers -Wno-missing-prototypes -Werror\=return-type -Wdocumentation -Wunreachable-code -Wno-implicit-atomic-properties -Werror\=deprecated-objc-isa-usage -Wno-objc-interface-ivars -Werror\=objc-root-class -Wno-arc-repeated-use-of-weak -Wimplicit-retain-self -Wduplicate-method-match -Wno-missing-braces -Wparentheses -Wswitch -Wunused-function -Wno-unused-label -Wno-unused-parameter -Wunused-variable -Wunused-value -Wempty-body -Wuninitialized -Wconditional-uninitialized -Wno-unknown-pragmas -Wno-shadow -Wno-four-char-constants -Wno-conversion -Wconstant-conversion -Wint-conversion -Wbool-conversion -Wenum-conversion -Wno-float-conversion -Wnon-literal-null-conversion -Wobjc-literal-conversion -Wshorten-64-to-32 -Wpointer-sign -Wno-newline-eof -Wno-selector -Wno-strict-selector-match -Wundeclared-selector -Wdeprecated-implementations -Wno-implicit-fallthrough -fstrict-aliasing -Wprotocol -Wdeprecated-declarations -Wno-sign-conversion -Winfinite-recursion -Wcomma -Wblock-capture-autoreleasing -Wstrict-prototypes -Wno-semicolon-before-method-body -Wunguarded-availability -index-store-path /Users/edge/Library/Developer/Xcode/DerivedData/hot_reload-gayvlvbtqyhllgghfunhlhbkhmlo/Index.noindex/DataStore @/Users/edge/Library/Developer/Xcode/DerivedData/hot_reload-gayvlvbtqyhllgghfunhlhbkhmlo/Build/Intermediates.noindex/hot_reload.build/Debug-iphoneos/hot_reload.build/Objects-normal/arm64/e6072d4f65d7061329687fe24e3d63a7-common-args.resp -MMD -MT dependencies -MF /Users/edge/Library/Developer/Xcode/DerivedData/hot_reload-gayvlvbtqyhllgghfunhlhbkhmlo/Build/Intermediates.noindex/hot_reload.build/Debug-iphoneos/hot_reload.build/Objects-normal/arm64/DemoViewController.d --serialize-diagnostics /Users/edge/Library/Developer/Xcode/DerivedData/hot_reload-gayvlvbtqyhllgghfunhlhbkhmlo/Build/Intermediates.noindex/hot_reload.build/Debug-iphoneos/hot_reload.build/Objects-normal/arm64/DemoViewController.dia -c /Users/edge/work/hot_reload_demo/hot_reload/DemoViewController.m -o /Users/edge/Library/Developer/Xcode/DerivedData/hot_reload-gayvlvbtqyhllgghfunhlhbkhmlo/Build/Intermediates.noindex/hot_reload.build/Debug-iphoneos/hot_reload.build/Objects-normal/arm64/DemoViewController.o -index-unit-output-path /hot_reload.build/Debug-iphoneos/hot_reload.build/Objects-normal/arm64/DemoViewController.o

By the way, on device inject, the parsePlatform will not work.

from injectioniii.

qmkCamel avatar qmkCamel commented on June 4, 2024

By the way, on device Objective-C inject, the parsePlatform will not work too on Xcode 15.3.
https://github.com/johnno1962/HotReloading/blob/82e4ea05a4a1f5fa41439dab5b520b9b944749f0/Sources/HotReloading/SwiftEval.swift#L524

from injectioniii.

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.