Skip to content

Commit

Permalink
Update glean_parser_ext to be compatible with glean_parser 7.0.0 (#5757)
Browse files Browse the repository at this point in the history
With the breaking change on glean_parser not to support untyped event
extras, the has_extra_types property was removed.
  • Loading branch information
brizental authored Jan 24, 2023
1 parent ef1f641 commit ee8b1ec
Showing 1 changed file with 1 addition and 8 deletions.
9 changes: 1 addition & 8 deletions vpnglean/glean_parser_ext/templates/rust.jinja2
Original file line number Diff line number Diff line change
Expand Up @@ -17,15 +17,8 @@ use once_cell::sync::Lazy;

{% macro generate_extra_keys(obj) -%}
{% for name, _ in obj["_generate_enums"] %}
{# we always use the `extra` suffix, because we only expose the new event API #}
{% set suffix = "Extra" %}
{% if obj|attr(name)|length %}
{% if obj.has_extra_types %}
{{ extra_keys_with_types(obj, name, suffix)|indent }}
{% else %}
compile_error!("Untyped event extras not supported. Please annotate event extras with a type. See documentation for details. (Metric: {{obj.category}}.{{obj.name}}, defined in: {{obj.defined_in['filepath']}}:{{obj.defined_in['line']}})");
{% endif %}
{% endif %}
{{ extra_keys_with_types(obj, name, suffix)|indent }}
{% endfor %}
{%- endmacro -%}

Expand Down

0 comments on commit ee8b1ec

Please sign in to comment.