apollo-compiler@1.0.0-beta.18
1.0.0-beta.18 - 2024-06-27
BREAKING
-
Namerepresentation change - SimonSapin in pull/868. The memory representation of GraphQL names is changed to useArc<str>or&'static strinternally, and provide corresponding cheap conversions. This may also help enable string interning in a future compiler version.Nameshould 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.NodeStrhas been removed, with its functionality folded intoNameast::Value::Stringnow contains a plainStringinstead ofNodeStr.Valueitself is in aNode<_>that contains the same source span asNodeStrdid.- Descriptions are now represented as
Option<Node<str>>instead ofOption<NodeStr>.
-
Feature REMOVED:
Hashcache inNode<T>- SimonSapin in pull/872.Node<T>is a reference-counted smart pointer that provides thread-safe shared ownership for atTvalue together with an optional source location. In previous beta version of apollo-compiler 1.0 it contained a cache in itsHashimplementation: the hash of theTvalue 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 eachNodeheap allocation by 8 bytes, and reduces code complexity.Now that apollo-compiler does not use Salsa anymore,
Hashis much less central than it used to be. Many types stored inNode<_>don’t implementHashat all (because they contain anIndexMapwhich 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.