Skip to content
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

Diagnostics with tracing #4

Merged
merged 4 commits into from
Dec 16, 2024
Merged

Diagnostics with tracing #4

merged 4 commits into from
Dec 16, 2024

Conversation

adzialocha
Copy link
Member

No description provided.

@swick
Copy link
Collaborator

swick commented Dec 12, 2024

LGTM

@adzialocha
Copy link
Member Author

This is not working yet as I cant get the env vars into the build process. Setting them in the builder config doesn't have any effect.

Im suspecting meson to not forward these settings but Im also a bit overasked ..

@swick
Copy link
Collaborator

swick commented Dec 12, 2024

will take a look later

@swick
Copy link
Collaborator

swick commented Dec 13, 2024

So, adding env to the build context really only adds them during the build. We can set the env for execution in finish-args:

diff --git ./org.p2panda.aardvark.json ../org.p2panda.aardvark.json
index bcbbd31..8d03175 100644
--- ./org.p2panda.aardvark.json
+++ ../org.p2panda.aardvark.json
@@ -12,17 +12,15 @@
         "--share=ipc",
         "--socket=fallback-x11",
         "--device=dri",
-        "--socket=wayland"
+        "--socket=wayland",
+        "--env=RUST_BACKTRACE=1",
+        "--env=RUST_LOG=debug"
     ],
     "build-options" : {
         "append-path" : "/usr/lib/sdk/rust-stable/bin",
         "build-args" : [
             "--share=network"
-        ],
-        "env" : {
-            "RUST_BACKTRACE" : "1",
-            "RUST_LOG" : "debug"
-        }
+        ]
     },
     "cleanup" : [
         "/include",
~

That works, but also means the app would ship to users like that. Ideally one could configure env in builder (Configure Project -> Applications). But unfortunately I can only choose the Run Command (Flatpak Application) but not set any environment.

Another way is to use a Command (Configure Project -> Commands) to spawn e.g. bash with "As Target Application" Locality and then just run "RUST_DEBUG=1 aardvark" there...

@swick
Copy link
Collaborator

swick commented Dec 14, 2024

rebased

@adzialocha adzialocha marked this pull request as ready for review December 16, 2024 12:34
@adzialocha adzialocha merged commit ca4094a into main Dec 16, 2024
8 checks passed
@adzialocha adzialocha deleted the adz/tracing branch December 22, 2024 22:02
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants