Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Prepare [email protected] release #875

Merged
merged 1 commit into from
Jun 27, 2024
Merged

Prepare [email protected] release #875

merged 1 commit into from
Jun 27, 2024

Conversation

SimonSapin
Copy link
Contributor

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 use Arc<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, and apollo_compiler::schema::Name) now emit a deprecation warning and will be removed in a later version.
    • NodeStr has been removed, with its functionality folded into Name
    • ast::Value::String now contains a plain String instead of NodeStr. Value itself is in a Node<_> that contains the same source span as NodeStr did.
    • Descriptions are now represented as Option<Node<str>> instead of Option<NodeStr>.
  • Feature REMOVED: Hash cache in Node<T> - SimonSapin in pull/872. Node<T> is a reference-counted smart pointer that provides thread-safe shared ownership for at T value together with an optional source location. In previous beta version of apollo-compiler 1.0 it contained a cache in its Hash implementation: the hash of the T value would be computed once and stored, then Hash for Node<T> would hash that hash code. That functionality is now removed, Hash for Node<T> simply forwards to Hash for T. This reduces each Node 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 in Node<_> don’t implement Hash at all (because they contain an IndexMap 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.

@SimonSapin SimonSapin merged commit 356b702 into main Jun 27, 2024
12 checks passed
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.

None yet

2 participants