protostar - tests failing

Finished test [unoptimized + debuginfo] target(s) in 0.07s
Running unittests src/lib.rs (target/debug/deps/protostar-e14b68abae2a9f7f)

running 4 tests
test xdg::test_get_icon_path ... FAILED
test xdg::test_parse_desktop_file ... ok
test xdg::test_get_desktop_files ... ok
test xdg::test_render_svg_to_png ... ok

failures:

---- xdg::test_get_icon_path stdout ----
[src/xdg.rs:239] &icon_paths = []
thread 'xdg::test_get_icon_path' panicked at 'assertion failed: icon_paths.contains(&RawIconType::Png(PathBuf::from(\"/usr/share/icons/hicolor/16x16/apps/krita.png\")))', src/xdg.rs:242:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
xdg::test_get_icon_path

test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

error: test failed, to rerun pass `--lib`
Finished test [unoptimized + debuginfo] target(s) in 0.07s
Running unittests src/lib.rs (target/debug/deps/protostar-e14b68abae2a9f7f)

running 4 tests
test xdg::test_get_icon_path ... FAILED
test xdg::test_parse_desktop_file ... ok
test xdg::test_get_desktop_files ... ok
test xdg::test_render_svg_to_png ... ok

failures:

---- xdg::test_get_icon_path stdout ----
[src/xdg.rs:239] &icon_paths = []
thread 'xdg::test_get_icon_path' panicked at 'assertion failed: icon_paths.contains(&RawIconType::Png(PathBuf::from(\"/usr/share/icons/hicolor/16x16/apps/krita.png\")))', src/xdg.rs:242:5
note: run with `RUST_BACKTRACE=1` environment variable to display a backtrace


failures:
xdg::test_get_icon_path

test result: FAILED. 3 passed; 1 failed; 0 ignored; 0 measured; 0 filtered out; finished in 0.04s

error: test failed, to rerun pass `--lib`
56 Replies
Nova
Nova2y ago
do you have krita installed? we needed some icon to test
Saphira Kai
Saphira KaiOP2y ago
krita? uh yeah
Nova
Nova2y ago
ok then @Viola (Nicola) can you help fix this? also... we really need to just refactor protostar entirely we have like 3 versions of it the tech debt is insane we were rushing to get it done for the talk
Saphira Kai
Saphira KaiOP2y ago
haha yeah
Viola (Nicola)
uhm yeah, can you ping me in 2 days please, so I'll be home to fix it
Nova
Nova2y ago
oh ok!
Viola (Nicola)
alr, I've merged @Bon Echo 's branch together to mine and now it should be possibile to merge without conflicts to the original protostar repo. (ofc nothing works right now, but I'm working on fixing it) @Nova quick question
let model = Model::create(
parent,
t,
&ResourceID::new_namespaced("protostar", "hexagon/hexagon"),
)?;
let model_part = model.model_part("??????").unwrap();
model_part
.set_material_parameter("color", MaterialParameter::Color([0.0, 1.0, 1.0, 1.0]))?;
let model = Model::create(
parent,
t,
&ResourceID::new_namespaced("protostar", "hexagon/hexagon"),
)?;
let model_part = model.model_part("??????").unwrap();
model_part
.set_material_parameter("color", MaterialParameter::Color([0.0, 1.0, 1.0, 1.0]))?;
where do I get the model_part relative path of the model?
Nova
Nova2y ago
check the app_grid branch I've done it already
Viola (Nicola)
okay I've checked that out, but
.model_part("Hex")
.unwrap()
.set_material_parameter("color", MaterialParameter::Color(color))
.model_part("Hex")
.unwrap()
.set_material_parameter("color", MaterialParameter::Color(color))
the color definately isn't chaning the color of the hex, but the tint of the image
No description
Nova
Nova2y ago
that's weird... copy the hexagon.glb over? also look in app_grid I modularized the protostar code a bit
Viola (Nicola)
ah sorry, I didn't notice that it changed!
Nova
Nova2y ago
I didn't either tbh OH I separated by material right
Viola (Nicola)
yup, I'm reading it... more merging to do, yay ! I should have merged it right when the talk had ended, my bad :p
Nova
Nova2y ago
I didn't want to lose the cartridges so I delayed the merge too
Viola (Nicola)
Yeah, that's in the new todo 2. Untangle the code (eg: make it so that the user can decide sizes, models, etc... ) 3. Implement configuration files in the examples
confy - Rust
Zero-boilerplate configuration management
Nova
Nova2y ago
config files? oh for spacing and such?
Viola (Nicola)
yep, sizes/activation distance...
Nova
Nova2y ago
also don't forget "make icons work again"
Viola (Nicola)
1. Implement our own (more reliable) way to get icons
Nova
Nova2y ago
since most of them broke again yea :p
Viola (Nicola)
probably gonna make my own crate to do that
Nova
Nova2y ago
thank you
Viola (Nicola)
since linicon didn't really work out great
Nova
Nova2y ago
oh you tried that?
Viola (Nicola)
yeah, that's what we are using rn
Nova
Nova2y ago
I thought you used your xdg module stuff that worked pretty well
Viola (Nicola)
nope, that's just for getting the desktop entries
Nova
Nova2y ago
huh my memory must be going, I could have sworn we had a custom impl
Viola (Nicola)
I wanted something more robust that handled the theming better for icons (which linicon does), but it seems like it doesn't find some icons :/
Nova
Nova2y ago
that it worked better before
Viola (Nicola)
we used walkdir to serach for the icons in a set directory
Nova
Nova2y ago
ahh yea OK so not themed
Viola (Nicola)
which wasn't "correct" strictly speaking, but it did like 50% of the icons
Nova
Nova2y ago
gotcha
Viola (Nicola)
now on my system, this does about 90% of the icons but honestly, I'd have to read lots of gtk code do undestand how they do it since the freedesktop standard is very loose(and old) , gtk code is the de facto standard but I really don't wana include gtk-rs in the dependecy for just icons, so yeah gotta build my own
Nova
Nova2y ago
I know a rust app launcher that does it perfectly trying to find the link again there's a freedesktop-icons crate maybe that could help?
Viola (Nicola)
uhm yeah, it even has built in caching will definately try it, thanks :3
Nova
Nova2y ago
i saw it in the cosmic launcher from system76 their cosmic stuff has been a great help as has smithay, which system76 maintains not on mine :p
Viola (Nicola)
clearly user error! /s ahh cool!
Nova
Nova2y ago
anything you need me to do @Viola (Nicola)?
Viola (Nicola)
nothing specific, but if you were avaiable for a quick call maybe in an hour to review some of the code together it would help
Nova
Nova2y ago
hell yea i can the hexagon launcher is amazing i'd love to work on it with you
Viola (Nicola)
thanks :3
Nova
Nova2y ago
so call now or when?
Viola (Nicola)
I need to get something to eat, so in about 40mintues if that's fine by you
Nova
Nova2y ago
yea sure thing ping me when ready
Viola (Nicola)
Jitsi Meet
Join a WebRTC video conference powered by the Jitsi Videobridge
Viola (Nicola)
alr @Saphira Kai in theory the latest commit should have solved this issues. try it if you can and let me know :3 small note: if you encounter errors with serde, you might need to delete the old cache folder which is in $HOME/.cache/protostar_icon_cache
Saphira Kai
Saphira KaiOP2y ago
okie! it might be good to automatically do that though lol
Viola (Nicola)
yup I will add it soon
Saphira Kai
Saphira KaiOP2y ago
yeee
Viola (Nicola)
actually, I just checked, and serde invalidates it automatically serde ❤️
Saphira Kai
Saphira KaiOP2y ago
oh nice! yep, success protostar builds on my machine er, the tests pass
Viola (Nicola)
niceee we still have some bugs to iron out with the examples, but I'll work on them later right now I'm focused on the xdg lib
Saphira Kai
Saphira KaiOP2y ago
yeee
Nova
Nova2y ago
thank you so much nicola
Want results from more Discord servers?
Add your server