Skip to content

fix(v2): Don't require macro callers to have std::str::FromStr in scope#1244

Merged
sbernauer merged 4 commits into
mainfrom
fix/attributed-string-type-from-str-import
Jul 7, 2026
Merged

fix(v2): Don't require macro callers to have std::str::FromStr in scope#1244
sbernauer merged 4 commits into
mainfrom
fix/attributed-string-type-from-str-import

Conversation

@sbernauer

Copy link
Copy Markdown
Member

Description

Fixes

error[E0599]: no function or associated item named `from_str` found for struct `TrinoCatalogName` in the current scope
   --> rust/operator-binary/src/crd/catalog/mod.rs:136:1
    |
136 | / attributed_string_type! {
137 | |     TrinoCatalogName,
138 | |     "The name of a TrinoCluster",
139 | |     "lakehouse",
...   |
147 | |     is_valid_label_value
148 | | }
    | | ^
    | | |
    | |_function or associated item not found in `TrinoCatalogName`
    |   function or associated item `from_str` not found for this struct
    |
    = help: items from traits can only be used if the trait is in scope
    = note: this error originates in the macro `attributed_string_type` (in Nightly builds, run with -Z macro-backtrace for more info)
help: trait `FromStr` which provides `from_str` is implemented but not in scope; perhaps you want to import it
    |
  1 + use std::str::FromStr;
    |

Definition of Done Checklist

  • Not all of these items are applicable to all PRs, the author should update this template to only leave the boxes in that are relevant
  • Please make sure all these things are done and tick the boxes

Author

  • Changes are OpenShift compatible
  • CRD changes approved
  • CRD documentation for all fields, following the style guide.
  • Integration tests passed (for non trivial changes)
  • Changes need to be "offline" compatible

Reviewer

  • Code contains useful comments
  • Code contains useful logging statements
  • (Integration-)Test cases added
  • Documentation added or updated. Follows the style guide.
  • Changelog updated
  • Cargo.toml only contains references to git tags (not specific commits or branches)

Acceptance

  • Feature Tracker has been updated
  • Proper release label has been added

@sbernauer sbernauer self-assigned this Jul 7, 2026
@siegfriedweber siegfriedweber self-requested a review July 7, 2026 09:04

@siegfriedweber siegfriedweber left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sbernauer sbernauer moved this to Development: Done in Stackable Engineering Jul 7, 2026
@sbernauer sbernauer enabled auto-merge July 7, 2026 09:10
Comment thread crates/stackable-operator/src/v2/macros/attributed_string_type.rs
@sbernauer sbernauer moved this from Development: Done to Development: In Review in Stackable Engineering Jul 7, 2026
@sbernauer sbernauer added this pull request to the merge queue Jul 7, 2026
Merged via the queue into main with commit bf80520 Jul 7, 2026
5 checks passed
@sbernauer sbernauer deleted the fix/attributed-string-type-from-str-import branch July 7, 2026 09:38
@sbernauer sbernauer moved this from Development: In Review to Development: Done in Stackable Engineering Jul 7, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

Status: Development: Done

Development

Successfully merging this pull request may close these issues.

3 participants