-
-
Notifications
You must be signed in to change notification settings - Fork 21
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
fix: ci compile errors #20
base: master
Are you sure you want to change the base?
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
approving because build error stops it from actually building instead of tests... which seems to be broken
Noticing an issue in regards to the second test in lib.rs It panics with:
|
Using a Sha1 cert did NOT work. |
I'm lost at this point, it looks like it's prompting for a Sha1 cert, but when using a Sha1 cert the exact same error occurs. I fixed the build errors, it can't get past the test though. |
@JoeMatt thoughts? |
Looks like the issue is that the test code is incomplete. I would suggest removing it or fixing it. Since I'm new to Rust, I asked an LLM to clean up the warnings VSCode gave me about using #[test]
fn sign_app() {
crate::tests::logger();
let p12_content = std::fs::read("TODO.p12").expect("Failed to read TODO.p12 file");
super::sign_app(
"src/test.app",
"com.wesbryie.test",
&p12_content, // Pass the content as a slice reference instead of an owned vector
"",
)
.expect("Signing app failed.");
} I replaced the I assume this needs the P12? |
In apple-codesign-wrapper/lib.rs I just commented out the test because its giving some oddball error which cannot be solved by me even with the suggestion above. (cc: @JoeMatt ) The check is failing because xcsession.rs expects user input, but I feel that a test should not have user input. Is this safe to comment out? @JJTech0130 For fetch_anisette_ssc test, I feel it should be commented out because omnisette is obsolete when compared to anisette-server-v3. Do you agree with this? It fails with a directory not found error regarding the anisette_test directory. |
Actually, I think that omnisette[storeservicescore] is ideal for use cases where it's just a single instance on-device, and should be kept working if possible-- the only real downside was memory leaks, right? As for the directory not found error: pretty sure that's the output directory for the anisette.pb file, right? There's some kind of temporary test or build directory created by Rust automatically, right? Maybe you could put it in there? Another thing, is there anywhere we can move |
Agreed. I'm just learning Rust, but it looks like they follow a similar pattern to SPM, where tests go into a The way this test function is defined, I think, makes it required to be in the same file. The LLM also suggested refactoring that method into a separate method and file. Maybe ask a GPT 🙂 I've been using LM Studio with models downloaded from HuggingFace for free local LLM that you can then connect to other IDEs. |
This reverts commit 56fadef.
I'm not sure if it's merged fully yet, but I implemented Anisette v3 into omnisette, so it's not completely obsolete. The anisette_test directory is used by my v3 impl to store the returned device data/provisioning keys. I don't know what it was for in the older anisette impls, or what omnisette was even supposed to do before v3 lol. That is where I store the anisette.pb file. Tests can go in a test module, either in a different file or in the same one. Just note them with |
How about we shelve that test to get this PR in and make a new ticket to add more test coverage? |
Closes: #19
I've fixed the build errors, but the test errors aren't passing. Both fixes are provided by VS Code + rust-analyzer.
I also added
workflow_dispatch:
to the workflow to allow manual runs, which I found to be needed in the scenario of committing to a fork before enabling workflows.