getreu / tp-note

Minimalistic note taking: save and edit your clipboard content as a note file (Gitlab mirror)
https://blog.getreu.net/projects/tp-note/
Apache License 2.0
116 stars 3 forks source link

cannot find value `app_args` in this scope #17

Closed 0323pin closed 1 year ago

0323pin commented 1 year ago

Building either 1.22.2 and/or 1.22.3 yields the following error:

error[E0425]: cannot find value `app_args` in this scope
  --> tpnote/src/file_editor.rs:42:18
   |
42 |                 &app_args.editor
   |                  ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `app_args` in this scope
  --> tpnote/src/file_editor.rs:51:27
   |
51 |         (None, false) => &app_args.editor,
   |                           ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `app_args` in this scope
  --> tpnote/src/file_editor.rs:52:23
   |
52 |         (_, true) => &app_args.editor_console,
   |                       ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `app_args` in this scope
  --> tpnote/src/viewer/web_browser.rs:52:14
   |
52 |             &app_args.browser
   |              ^^^^^^^^ not found in this scope

error[E0425]: cannot find value `app_args` in this scope
  --> tpnote/src/viewer/web_browser.rs:63:10
   |
63 |         &app_args.browser
   |          ^^^^^^^^ not found in this scope

warning: unused import: `crate::config::CFG`
 --> tpnote/src/file_editor.rs:3:5
  |
3 | use crate::config::CFG;
  |     ^^^^^^^^^^^^^^^^^^
  |
  = note: `#[warn(unused_imports)]` on by default

warning: unused import: `crate::config::CFG`
 --> tpnote/src/viewer/web_browser.rs:2:5
  |
2 | use crate::config::CFG;
  |     ^^^^^^^^^^^^^^^^^^

For more information about this error, try `rustc --explain E0425`.
warning: `tpnote` (bin "tpnote") generated 2 warnings
error: could not compile `tpnote` (bin "tpnote") due to 5 previous errors; 2 warnings emitted
*** Error code 101

Stop.

OS: NetBSD-10.99.9 dev version Rust: 1.72.0

getreu commented 1 year ago

Good evening,

 

I noticed, that I published in the middle of a git rebase. In the meantime I published v1.22.3. Please let me know if the problem still persists.

 

Kind regards

 

 

 

Jens Getreu

   

Gesendet: Freitag, 29. September 2023 um 20:08 Uhr Von: "pin" @.> An: "getreu/tp-note" @.> Cc: "Subscribed" @.***> Betreff: [getreu/tp-note] cannot find value app_args in this scope (Issue #17)

 

Building either 1.22.2 and/or 1.22.3 yields the following error:

error[E0425]: cannot find value app_args in this scope --> tpnote/src/file_editor.rs:42:18 | 42 | &app_args.editor | ^^^^^^^^ not found in this scope

error[E0425]: cannot find value app_args in this scope --> tpnote/src/file_editor.rs:51:27 | 51 | (None, false) => &app_args.editor, | ^^^^^^^^ not found in this scope

error[E0425]: cannot find value app_args in this scope --> tpnote/src/fileeditor.rs:52:23 | 52 | (, true) => &app_args.editor_console, | ^^^^^^^^ not found in this scope

error[E0425]: cannot find value app_args in this scope --> tpnote/src/viewer/web_browser.rs:52:14 | 52 | &app_args.browser | ^^^^^^^^ not found in this scope

error[E0425]: cannot find value app_args in this scope --> tpnote/src/viewer/web_browser.rs:63:10 | 63 | &app_args.browser | ^^^^^^^^ not found in this scope

warning: unused import: crate::config::CFG --> tpnote/src/file_editor.rs:3:5 3 use crate::config::CFG; ^^^^^^^^^^^^^^^^^^

= note: #[warn(unused_imports)] on by default

warning: unused import: crate::config::CFG --> tpnote/src/viewer/web_browser.rs:2:5 | 2 | use crate::config::CFG; | ^^^^^^^^^^^^^^^^^^

For more information about this error, try rustc --explain E0425. warning: tpnote (bin "tpnote") generated 2 warnings error: could not compile tpnote (bin "tpnote") due to 5 previous errors; 2 warnings emitted *** Error code 101

Stop.

OS: NetBSD-10.99.9 dev version Rust: 1.72.0

— Reply to this email directly, view it on GitHub, or unsubscribe. You are receiving this because you are subscribed to this thread.Message ID: @.***>

0323pin commented 1 year ago

Yes, it remains in 1.22.3

getreu commented 1 year ago

Have you noticed, that the binary is now build with the tpnote crate? The tp-note crate is obsolete.

0323pin commented 1 year ago

Yes but, the repository is the same, right?

getreu commented 1 year ago

Yes. Could you please check your Cargo.lock. It seems your versions are not right:

[[package]]
name = "tpnote"
version = "1.22.3"

and

[[package]]
name = "tpnote-lib"
version = "0.25.0"
getreu commented 1 year ago

I think I know, what the problem is. Your target is not one of those?

    #[cfg(target_os = "linux")]
    let app_args = &CFG.app_args.linux;
    #[cfg(target_os = "windows")]
    let app_args = &CFG.app_args.windows;
    #[cfg(target_os = "macos")]
    let app_args = &CFG.app_args.macos;
getreu commented 1 year ago

I will add your target to the list and publish v1.22.4 ASAP. Latest tomorrow. Thank you for reporting this.

0323pin commented 1 year ago

Thank you! No rush, I don't have the time for it today.

getreu commented 1 year ago

I pushed v1.22.4. I hope it fixes this.

0323pin commented 1 year ago

Add compilation target freebsd, fixes #17

But, I'm on NetBSD, not FreeBSD.

I can see you have a general definition and that should do it. But, if this works, I'll use Add compilation target *bsd, fixes #17, if you don't mind.

0323pin commented 1 year ago

@getreu Fixed thanks! ~I'll update our package.~ I've merged the update.