Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
1.0.0-beta.18 - 2024-06-27
BREAKING
Name
representation change - SimonSapin in pull/868. The memory representation of GraphQL names is changed to useArc<str>
or&'static str
internally, and provide corresponding cheap conversions. This may also help enable string interning in a future compiler version.Name
should now be imported from the crate root. The previous paths (apollo_compiler::ast::Name
,apollo_compiler::executable::Name
, andapollo_compiler::schema::Name
) now emit a deprecation warning and will be removed in a later version.NodeStr
has been removed, with its functionality folded intoName
ast::Value::String
now contains a plainString
instead ofNodeStr
.Value
itself is in aNode<_>
that contains the same source span asNodeStr
did.Option<Node<str>>
instead ofOption<NodeStr>
.Feature REMOVED:
Hash
cache inNode<T>
- SimonSapin in pull/872.Node<T>
is a reference-counted smart pointer that provides thread-safe shared ownership for atT
value together with an optional source location. In previous beta version of apollo-compiler 1.0 it contained a cache in itsHash
implementation: the hash of theT
value would be computed once and stored, thenHash for Node<T>
would hash that hash code. That functionality is now removed,Hash for Node<T>
simply forwards toHash for T
. This reduces eachNode
heap allocation by 8 bytes, and reduces code complexity.Now that apollo-compiler does not use Salsa anymore,
Hash
is much less central than it used to be. Many types stored inNode<_>
don’t implementHash
at all (because they contain anIndexMap
which doesn’t either).Programs that relied on this cache will still compile. We still consider this change breaking as they’ll need to build their own cache to maintain performance characteristics.
Fixes