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

Some errors in compilation/execution don't appear in the CLI output #74

Closed
afidegnum opened this issue Nov 11, 2021 · 13 comments
Closed
Assignees
Labels
A-cli Area: command line interface C-bug Category: bug D-medium Difficulty: medium P-high Priority: high S-waiting-on-author Status: waiting on author

Comments

@afidegnum
Copy link
Contributor

afidegnum commented Nov 11, 2021

Describe the bug
I ran cargo check, everything works well with no error but when I ran persus serve the servers compiles then exits

this is the current state from the shell

Finished dev [unoptimized + debuginfo] target(s) in 29.30s
Running target/debug/perseus-builder
[1/4] 🔨 Generating your app...❌
[2/4] 🏗️ Building your app to Wasm...✅
[3/4] 📡 Building server...✅

Expected behavior
Is there a way to print the error log?

Environment (please complete the following information):

[package]
name = "emlfront"
version = "0.3.0-beta.3"
edition = "2018"

# See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html

[dependencies]
perseus = "0.3.0-beta.17"
sycamore = "0.6.3"
sycamore-router = "0.6.3"
serde = { version = "1", features = ["derive"] }
serde_json = "1"
fluent-bundle = "0.15"
walkdir = "2"
pulldown-cmark = "0.8"
lazy_static = "1"
web-sys = { version = "0.3", features = [ "Event", "EventTarget" ] }
wasm-bindgen = "0.2"
perseus-size-opt = "0.1"

# [lib]
# crate-type = ["cdylib", "rlib"]
@arctic-hen7
Copy link
Member

Ah. This can occasionally happen, and should be listed in the docs (and further investigated generally). You should be able to view the error logs by moving into the .perseus/builder directory and running cargo run --bin perseus-builder. That will run the binary used for building your app directly. Also, it looks like you're using a very old beta, the latest is beta 17 (very soon to be 18).

@arctic-hen7 arctic-hen7 changed the title Perseus serve fail without a warning Some errors in compilation/execution don't appear in the CLI output Nov 11, 2021
@arctic-hen7
Copy link
Member

I'll leave this issue open until I've sorted this problem out more broadly, because it can be very cryptic!

@afidegnum
Copy link
Contributor Author

ok, I've found one of the culprits, taken from your website example, Perseus had features = [ "translator-fluent" ] even though I disabled it, the function perseus::t and link was still in the code. which generated that error, I wish it should have more explicit errors especially calling functions when its feature is not active.

@arctic-hen7
Copy link
Member

Okay, I know I've had this issue before, but now that I'm trying to cause it, I'm having trouble! @afidegnum, could you describe exactly (step-by-step) how to generate this bug from one of the examples? I have a good idea of what the problem is, but I need to check if my solution has actually worked.

arctic-hen7 added a commit that referenced this issue Nov 13, 2021
It seems sometimes the CLI misses some errors otherwise. Note that this isn't yet confirmed to be the solution to #74.
@afidegnum
Copy link
Contributor Author

ok, let me try to replicate the bug from my end again. but here is the workflow:
add perseus into the cargo without the fluent feature activated. perseus = "0.3.0-beta.17" then in calling either link or t
use perseus::{link, t; is enough to generate the error. I will check again on the latest commit and see

@arctic-hen7 arctic-hen7 self-assigned this Nov 15, 2021
@arctic-hen7 arctic-hen7 added A-cli Area: command line interface C-bug Category: bug D-medium Difficulty: medium P-high Priority: high S-waiting-on-author Status: waiting on author labels Nov 15, 2021
@arctic-hen7
Copy link
Member

As a side note, I've added perseus snoop now, which allows you to inspect the logs from building, Wasm building, and server running automatically. That doesn't fix this issue, but the latest code should (which will be released in beta 18).

@afidegnum
Copy link
Contributor Author

Thanks a lot, i'm going to make a good use of it

@arctic-hen7
Copy link
Member

@afidegnum I've released beta 18, does this issue still apply to you? Otherwise, I'll close it.

@afidegnum
Copy link
Contributor Author

Thanks, don't close it yet, currently working on sycamore, will come back to Perseus before the end of the day.

@arctic-hen7
Copy link
Member

@afidegnum any progress on this yet?

@afidegnum
Copy link
Contributor Author

yes, there is still work in the background, I'm working on the backend with sycamore and will bridge with Perseus. I was also working with some API stuffs too... I will update you shortly

@arctic-hen7
Copy link
Member

Okay, I've encountered another manifestation of this bug, so I'll keep this open for now and do some more testing.

@arctic-hen7
Copy link
Member

Okay, this doesn't seem to be an issue anymore, so I'm tentatively closing this. If anyone experiences this issue again, please let me know with an MRE, because getting this bug to happen is quite difficult when you're trying!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
A-cli Area: command line interface C-bug Category: bug D-medium Difficulty: medium P-high Priority: high S-waiting-on-author Status: waiting on author
Projects
None yet
Development

No branches or pull requests

2 participants