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

Replace DomNode#asText with DomNode#asNormalizedTest #18

Open
basil opened this issue Aug 18, 2023 · 5 comments
Open

Replace DomNode#asText with DomNode#asNormalizedTest #18

basil opened this issue Aug 18, 2023 · 5 comments
Labels
good first issue Good for newcomers recipe Requests for new automated code changes

Comments

@basil
Copy link
Contributor

basil commented Aug 18, 2023

HtmlUnit 2.55.0 removed the deprecated DomNode#asText in favor of DomNode#asNormalizedTest. Plugins with a very old plugin parent POM (one with HtmlUnit 2.54.0 or earlier) will likely still be using asText and will thus fail to compile until these usages are converted to asNormalizedText.

@timtebeek timtebeek moved this to Recipes Wanted in OpenRewrite Aug 18, 2023
@timtebeek timtebeek added the recipe Requests for new automated code changes label Aug 18, 2023
@basil
Copy link
Contributor Author

basil commented Aug 18, 2023

This and org.openrewrite.jenkins.UpgradeHtmlUnit_3_3_0 could likely be generalized into higher-level OpenRewrite functionality as it is specific to HtmlUnit but not specific to Jenkins.

@timtebeek timtebeek added the good first issue Good for newcomers label Aug 18, 2023
@timtebeek
Copy link
Contributor

Looks like this recipe would be a couple of lines of Yaml added to src/main/resources/META-INF/rewrite/htmlunit-3.yml. Would you want to get a first change?

We could indeed create a separate rewrite-htmlunit down the line; right now we only have those yaml recipes I believe, but that could expand once we run against more projects. Let me know if that's something you'd be willing to help maintain, or know folks that would.

@timtebeek
Copy link
Contributor

For good measure I've also added the HtmlUnit organization repositories to the Moderne platform, if you want to create some goodwill with PRs their way. :)

@basil
Copy link
Contributor Author

basil commented Aug 22, 2023

We could indeed create a separate rewrite-htmlunit down the line

I see no reason why we should have a separate rewrite-htmlunit. This seems like a better fit for https://github.com/openrewrite/rewrite-testing-frameworks since HtmlUnit is a testing framework.

@timtebeek
Copy link
Contributor

That could work as well; let me know if you'd like to take that on, or want me to do so.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue Good for newcomers recipe Requests for new automated code changes
Projects
Status: Recipes Wanted
Development

No branches or pull requests

2 participants