Git Product home page Git Product logo

Comments (15)

jfbilodeau avatar jfbilodeau commented on August 25, 2024 1

Done. Thanks!

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

@jfbilodeau Why is the feature requirement stilll there?

#![feature(get_mut_unchecked)]

Currently I am not able to compile this on stable rust.

from yew_form.

jfbilodeau avatar jfbilodeau commented on August 25, 2024

Thanks for the heads up @L0g4n . My oversight. I remove the offending line and updated the crate. Please let me know if it compiles successfully for you.

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

@jfbilodeau Thanks. I apologize if I sounded a bit harsh, I really appreciate your work here.

from yew_form.

jfbilodeau avatar jfbilodeau commented on August 25, 2024

@L0g4n: No offence taken. I appreciate the correction.

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

@jfbilodeau Sorry to bother again, but when I try to reproduce your form example I now get
panicked at 'called `Option::unwrap()` on a `None` value', ~\.cargo\registry\src\github.com-1ecc6299db9ec823\yew_form-0.1.7\src\form.rs:24:39 from your most recent commit.
This happens as soon as the oninput callback from the form is called, i.e. I type some sample text and then the panic happens.

from yew_form.

jfbilodeau avatar jfbilodeau commented on August 25, 2024

Hey @L0g4n, I'm having a hard time reproducing the problem at my end. Any chance you could send me a bit more details? Platform? How are you running the app? Anything else? Thanks!

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

Sure, I hope this is a minimal reproducible example: https://gist.github.com/L0g4n/aa943183eff937cfb90865563a03fe2a
Platform: x86_64-pc-windows-msvc
Edit: I am running the app via yarn, with the rust webpack plugin.

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

@jfbilodeau Could you reproduce the unwrap error with the code submitted in the gist or do you need more information?

from yew_form.

jfbilodeau avatar jfbilodeau commented on August 25, 2024

@L0g4n: Working on it. Any chance you could share with me your cargo.toml and lib.rs?

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

Sure.


[lib]
crate-type = ["cdylib", "rlib"]

[features]
default = ["wee_alloc"]

[dependencies]
yew = "0.17.3"
wasm-bindgen = "0.2.67"
wee_alloc = { version = "0.4.5", optional = true }
log = "0.4.11"
wasm-logger = "0.2.0"
console_error_panic_hook = "0.1.6"
anyhow = "1.0.32"
serde = { version = "1.0", features = ["derive"] }
# validator backend for `yew_form`
validator = { version = "0.10" }
validator_derive = "0.10"
yew_form = "0.1"
yew_form_derive = "0.1"

[dev-dependencies]
wasm-bindgen-test = "0.3"

lib.rs:

#![recursion_limit = "512"]

use wasm_bindgen::prelude::*;

mod api;
mod app;
mod models;
mod view;

// When the `wee_alloc` feature is enabled, use `wee_alloc` as the global
// allocator.
#[cfg(feature = "wee_alloc")]
#[global_allocator]
static ALLOC: wee_alloc::WeeAlloc = wee_alloc::WeeAlloc::INIT;

/// This is the entry point for the web app
#[wasm_bindgen]
pub fn run_app() {
    wasm_logger::init(wasm_logger::Config::default());

    // eases debugging by forwarding panic messages to the web console in debug mode
    #[cfg(debug_assertions)]
    console_error_panic_hook::set_once();

    yew::start_app::<view::Home>();
}

from yew_form.

jfbilodeau avatar jfbilodeau commented on August 25, 2024

Hey @L0g4n, sorry to bother you but I'm having trouble reproducing the crash with the code segments you provided. I hate to be a pain, but is there any chance you could privately share the full codebase to build and reproduce?

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

No problem, the frontend at this point in time is not that advanced. I have sent you an email with the source code.
At this point I suspect that I am doing something unexpected with your library and this is why I get an unwrap traceback.

from yew_form.

L0g4n avatar L0g4n commented on August 25, 2024

@jfbilodeau OK, so because I suspected an error from my side I just checked out this repo and built the example. Now: I get the same error here, as soon as I enter something in the form.
image

from yew_form.

jfbilodeau avatar jfbilodeau commented on August 25, 2024

@L0g4n: Sorry, your issue slipped betweens the cracks. It should now be solved.

from yew_form.

Related Issues (13)

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.