-
Notifications
You must be signed in to change notification settings - Fork 32
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
More semconv features and cleanups #97
More semconv features and cleanups #97
Conversation
Note: Overall weaver on windows tests still fail in other crates, mostly anything that prints file paths with expected output files. |
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #97 +/- ##
=====================================
Coverage 63.6% 63.6%
=====================================
Files 54 54
Lines 3235 3245 +10
=====================================
+ Hits 2058 2065 +7
- Misses 1177 1180 +3 ☔ View full report in Codecov by Sentry. |
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.
Just 2 minor suggestions before approving this PR. @
@@ -1,7 +1,7 @@ | |||
{%- set file_name = ctx.id | file_name -%} | |||
{{- template.set_file_name("attribute_group/" ~ file_name ~ ".md") -}} | |||
|
|||
## Group `{{ ctx.id }}` ({{ ctx.type }}) | |||
## Group `{{ ctx.id | split_id | list | join("_") }}` ({{ ctx.type }}) |
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.
Is there a reason why split_id
does not directly return a Vec
to avoid the list
filter?
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.
My cluelessness in using Minijinja. If I can just return a Vec and it works, great. I thought that Value::from_seq + returning a Vec were basically the same with one being less obvious.
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.
Moved to vec. Wierdly minijinja still is confused on values.
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.
Based on the code of the list filter (see below) you need to wrap the vec into a value.
#[cfg_attr(docsrs, doc(cfg(feature = "builtins")))]
pub fn list(state: &State, value: Value) -> Result<Value, Error> {
let iter = ok!(state.undefined_behavior().try_iter(value).map_err(|err| {
Error::new(ErrorKind::InvalidOperation, "cannot convert value to list").with_source(err)
}));
Ok(Value::from(iter.collect::<Vec<_>>()))
}
I don't have access to Windows, unfortunately. Can you create a GH issue to describe what's causing problems on Windows? It could be a perfect issue for someone who wants to start contributing to this repo. |
I had one open for forge. I haven't investigate the issue for other crates you, but I'll open one when I'm back on my windows machine later. |
Co-authored-by: Laurent Quérel <[email protected]>
This reverts commit b33000b.
"registry.foo" => ["registry", "foo"]
Fixes #84