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.- Descriptions are now represented as
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
- Fix validation error message for missing subselections - goto-bus-stop in pull/865. It now reports the correct coordinate for the missing subselection.