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

Leave debugStream as null on construction of parser token managers #952

Merged

Conversation

JayOfemi
Copy link
Contributor

  • You've read the Contributor Guide and Code of Conduct.
  • You've included unit or integration tests for your change, where applicable.
  • You've included inline docs for your change, where applicable.
  • There's an open issue for the PR that you are making. If you'd like to propose a change, please open an issue to discuss the change or find an existing issue.

Summary of the changes (Less than 80 chars)
Leave debugStream as null on construction of parser token managers.

Fixes #{bug number} (in this specific format)
Fixes #936

Description

{Detail}

* When debugStream is set to Console.Out by default, StandardSyntaxParserTokenManager throws an exception when constructing a StandardQueryParser on OSes that do not support System.Console, such as iOS and Android.
* debugStream can be set later using the setter, if needed.
* The above is the same for QueryParserTokenManager when constructing a QueryParser.
* See issue apache#936 for details.
@paulirwin
Copy link
Contributor

@JayOfemi Thanks for this PR. There are several more places where SystemConsole is used, so this change alone is likely insufficient to address the problem and cover all cases. Also, we'd like to use TextWriter.Null instead of actual null if possible. I will make that change and figure out an approach that will work well for MAUI without regressing other platforms. I'll make sure to include your commit in the history though so you get credit. No need to do anything at this time. Thanks!

@paulirwin paulirwin merged commit 7f3692b into apache:master Oct 15, 2024
@paulirwin
Copy link
Contributor

This was changed to use TextWriter.Null by default which should resolve the issue.

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.

Lucene.Net.Util.SystemConsole throws not supported exception in .NET MAUI app running on android/iOS
2 participants