Skip to content

change type signature for impl ariadne::Cache#960

Merged
lrlna merged 4 commits intomainfrom
lrlna/update_ariadne_trait_signature
Mar 19, 2025
Merged

change type signature for impl ariadne::Cache#960
lrlna merged 4 commits intomainfrom
lrlna/update_ariadne_trait_signature

Conversation

@lrlna
Copy link
Member

@lrlna lrlna commented Mar 18, 2025

fn fetch() and fn display() changed signatures in the latest patch release of ariadne (0.51.0).

  • fn fetch(&mut self, file_id: &FileId) -> Result<&ariadne::Source, Box<dyn fmt::Debug + '_>> --> fn fetch(&mut self, file_id: &FileId) -> Result<&ariadne::Source, impl fmt::Debug>
  • fn display<'a>(&self, file_id: &'a FileId) -> Option<Box<dyn fmt::Display + 'a>> --> fn display<'a>(&self, file_id: &'a FileId) -> Option<impl fmt::Display + 'a>

fn fetch() and fn display() changed signatures in the latest patch release of ariadne (0.51.0).

* `fn fetch(&mut self, file_id: &FileId) -> Result<&ariadne::Source, Box<dyn fmt::Debug + '_>>` --> `fn fetch(&mut self, file_id: &FileId) -> Result<&ariadne::Source, impl fmt::Debug>`
* `fn display<'a>(&self, file_id: &'a FileId) -> Option<Box<dyn fmt::Display + 'a>> ` --> `fn display<'a>(&self, file_id: &'a FileId) -> Option<impl fmt::Display + 'a>`
impl fmt::Display for Path {
fn fmt(&self, f: &mut fmt::Formatter<'_>) -> fmt::Result {
match self {
Path::SourceFile(source_file) => source_file.path().display().fmt(f),
Copy link
Member Author

Choose a reason for hiding this comment

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

this is adding an extra white space around path for some reason 🤔
so instead of this:

Error: `typeFragment1` contains too much nesting
    ╭─[overflow.graphql:11:11]

we get this:

Error: `typeFragment1` contains too much nesting
    ╭─[ overflow.graphql:11:11 ]

Copy link
Contributor

Choose a reason for hiding this comment

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

I think this is another change in Ariadne. We changed snapshots in router: apollographql/router#7012

@lrlna lrlna marked this pull request as ready for review March 19, 2025 14:07
@lrlna lrlna requested a review from a team as a code owner March 19, 2025 14:07
Copy link
Member

@goto-bus-stop goto-bus-stop left a comment

Choose a reason for hiding this comment

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

\ 😁 /

@lrlna lrlna enabled auto-merge (squash) March 19, 2025 15:27
@lrlna lrlna merged commit 3a938df into main Mar 19, 2025
12 checks passed
@lrlna lrlna deleted the lrlna/update_ariadne_trait_signature branch March 19, 2025 15:29
goto-bus-stop added a commit that referenced this pull request Apr 8, 2025
After #960, apollo-rs does not work with ariadne 0.5.0, so we should bump the
minimum version to 0.5.1.
goto-bus-stop added a commit that referenced this pull request Apr 8, 2025
After #960, apollo-rs does not work with ariadne 0.5.0, so we should bump the
minimum version to 0.5.1.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants

Comments