-
Notifications
You must be signed in to change notification settings - Fork 0
Conversation
4765fac
to
0c44cd9
Compare
e422f0e
to
db5ea0a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
this currently even fails to check:
cargo check
Updating git repository `ssh://git@github.com/xaynetwork/xayn_dart_api_dl.git`
error: failed to resolve patches for `https://github.com/rust-lang/crates.io-index`
Caused by:
failed to load source for dependency `xayn-dart-api-dl`
Caused by:
Unable to update ssh://git@github.com/xaynetwork/xayn_dart_api_dl.git?branch=TY-2221-2-bindings-for-dart-api-dl-h
Caused by:
failed to fetch into: /Users/janpetsche/.cargo/git/db/xayn_dart_api_dl-0480252925562bf4
Caused by:
failed to authenticate when downloading repository
* attempted ssh-agent authentication, but no usernames succeeded: `git`
if the git CLI succeeds then `net.git-fetch-with-cli` may help here
https://doc.rust-lang.org/cargo/reference/config.html#netgit-fetch-with-cli
Caused by:
no authentication available
let left = $left; | ||
let mut left = $crate::test_utils::trimmed_non_empty_lines(&left); | ||
let right = $right; | ||
let mut right = $crate::test_utils::trimmed_non_empty_lines(&right); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it seems unnecessary that the macro takes its arguments by value, is there a temporary reference issue? (can't check myself because code doesn't compile)
let left = $left; | |
let mut left = $crate::test_utils::trimmed_non_empty_lines(&left); | |
let right = $right; | |
let mut right = $crate::test_utils::trimmed_non_empty_lines(&right); | |
let mut left = $crate::test_utils::trimmed_non_empty_lines(&$left); | |
let mut right = $crate::test_utils::trimmed_non_empty_lines(&$right); |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Though assert
statements in general get called with values all the time and then there would be an temporary reference issue and requiring an explicit referencing of values isn't good UX while an additional &
normally doesn't cause problems.
it fails to access the private repository, i.e. it fails before it even comes to checking. To access private repositories as dependencies with cargo you need to have a running ssh agent. Git CLI has a workarounds for the case no ssh-agent is running, but a .ssh folder with keys exists. You can either:
Related issues: I also had to do this in the CI. I originally wanted to make the repos public before the holidays, but thinks got in the way (like the whole thing about how to license things). |
d3acece
to
c3b6d0d
Compare
622797f
to
01e578a
Compare
65ad9f4
to
a13085f
Compare
Be ware that due to the limitations mentioned in the (pre-)previous daily you might need to run
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
looks good 👍 Just a few suggestions/questions
I was also able to run test.sh
script
} | ||
"; | ||
|
||
static CLASS_TEMPLATE_NAME: &str = "class"; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
would it make sense to use const
here?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
sure, I'm now wondering if it actually makes a difference in the generated code. 🤔
Like at least most times due to the nature of &str
it makes sense for rust to generate roughly the same code for const
strings of it as it does for statics
ones ,I think (i.e. place it once in the executable in read-only memory and reference it from there).
And while it could optimize some pointer address comparisons differently, you probably don't run into them in rust in this context most of the times.
Anyway const
is stylistically more appropriate for this use-cases so I switched to it.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I was also not sure if this makes any difference 😅
Anyway const is stylistically more appropriate for this use-cases so I switched to it.
👍
No description provided.