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

Deprecation warnings from stdlib module #13036

Closed
naqvis opened this issue Feb 1, 2023 · 0 comments · Fixed by #13038
Closed

Deprecation warnings from stdlib module #13036

naqvis opened this issue Feb 1, 2023 · 0 comments · Fixed by #13038
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:serialization

Comments

@naqvis
Copy link
Contributor

naqvis commented Feb 1, 2023

Bug Report

standard library is generating Deprecation warning. Possible regression from #12663

Simple code to reproduce:

require "xml"

doc = XML.parse("<person></person>")

puts doc.xpath_bool("count(//person) > 0")

Deprecation warning generated

In /opt/homebrew/Cellar/crystal/1.7.2/share/crystal/src/xml/xpath_context.cr:12:7

 12 | {% if flag?(:arm) || flag?(:aarch64) %}
      ^
Warning: expanding macro


There was a problem expanding macro 'macro_4626584560'

Called macro defined in /opt/homebrew/Cellar/crystal/1.7.2/share/crystal/src/xml/xpath_context.cr:12:7

 12 | {% if flag?(:arm) || flag?(:aarch64) %}

Which expanded to:

   1 |
 > 2 |         if errors = XML::Error.errors
   3 |           raise errors.last
   4 |         end
   5 |
Warning: Deprecated XML::Error.errors. This class accessor is deprecated. XML errors are accessible directly in the respective context via `XML::Reader#errors` and `XML::Node#errors`.

Crystal Version

Crystal 1.7.2 (2023-01-23)

LLVM: 14.0.6
Default target: aarch64-apple-darwin22.2.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
kind:bug A bug in the code. Does not apply to documentation, specs, etc. topic:stdlib:serialization
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants