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

feat:remove jprotoc #13145

Merged
merged 20 commits into from
Oct 19, 2023
Merged

feat:remove jprotoc #13145

merged 20 commits into from
Oct 19, 2023

Conversation

sadfera
Copy link

@sadfera sadfera commented Sep 30, 2023

What is the purpose of the change

dubbo-compiler remove jprotoc dependecy

Brief changelog

1.Remove jprotc dependency and add mustache dependency for template generation code
2.Retain the ProtoTypeMap provided by the original jprotc for storing message types parsed from proto
3.Remove ProtocPlugin and use Dubbo's own DubboProtocPlugin as the main entry point for protoc plugin calls
4.DubboProtocPlugin no longer provides debug methods and only supports FEATURE_ PROTO3_ OPTIONAL
5.dubbo-maven-plugin supported dubbo-protoc-compiler mojo

Verifying this change

Checklist

  • Make sure there is a GitHub_issue field for the change (usually before you start working on it). Trivial changes like typos do not require a GitHub issue. Your pull request should address just this issue, without pulling in other changes - one PR resolves one issue.
  • Each commit in the pull request should have a meaningful subject line and body.
  • Write a pull request description that is detailed enough to understand what the pull request does, how, and why.
  • Check if is necessary to patch to Dubbo 3 if you are work on Dubbo 2.7
  • Write necessary unit-test to verify your logic correction, more mock a little better when cross module dependency exist. If the new feature or significant change is committed, please remember to add sample in dubbo samples project.
  • Add some description to dubbo-website project if you are requesting to add a feature.
  • GitHub Actions works fine on your own branch.
  • If this contribution is large, please follow the Software Donation Guide.

@codecov-commenter
Copy link

codecov-commenter commented Oct 5, 2023

Codecov Report

Merging #13145 (3219783) into 3.3 (c98c487) will decrease coverage by 0.38%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##                3.3   #13145      +/-   ##
============================================
- Coverage     68.41%   68.03%   -0.38%     
  Complexity        8        8              
============================================
  Files          1718     1726       +8     
  Lines         70833    71239     +406     
  Branches      10238    10287      +49     
============================================
+ Hits          48460    48470      +10     
- Misses        17683    18078     +395     
- Partials       4690     4691       +1     

see 39 files with indirect coverage changes

📣 We’re building smart automated test selection to slash your CI/CD build times. Learn more

Copy link
Contributor

@guohao guohao left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

* See the License for the specific language governing permissions and
* limitations under the License.
*/
package org.apache.dubbo.maven.plugin.protoc.plugin;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove a package path, and org.apache.dubbo.maven.plugin.protoc is better.

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Already refactored

@CrazyHZM
Copy link
Member

CrazyHZM commented Oct 7, 2023

@sadfera This change should also be accompanied by a change in the documentation used.

@sadfera
Copy link
Author

sadfera commented Oct 7, 2023

@sadfera This change should also be accompanied by a change in the documentation used.

Will be updated later on dubbo-website

Copy link
Member

@AlbumenJ AlbumenJ left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Update on 3.3 branch would be better

@sadfera sadfera changed the base branch from 3.2 to 3.3 October 10, 2023 02:47
@sadfera
Copy link
Author

sadfera commented Oct 10, 2023

Update on 3.3 branch would be better
ok

<plugin>
<groupId>org.apache.dubbo</groupId>
<artifactId>dubbo-maven-plugin</artifactId>
<version>3.2.7-SNAPSHOT</version>
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
<version>3.2.7-SNAPSHOT</version>
<version>3.3.0</version>

Comment on lines 1 to 16
/*
* Licensed to the Apache Software Foundation (ASF) under one or more
* contributor license agreements. See the NOTICE file distributed with
* this work for additional information regarding copyright ownership.
* The ASF licenses this file to You under the Apache License, Version 2.0
* (the "License"); you may not use this file except in compliance with
* the License. You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Remove this header and add this file into exclustion in license checker

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok

@sadfera sadfera requested a review from CrazyHZM October 10, 2023 10:37
import java.util.HashMap;
import java.util.Map;

public class DubboProtocPluginWrapperFactory {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

No place to use this class?

Copy link
Author

@sadfera sadfera Oct 13, 2023

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

org.apache.dubbo.maven.plugin.protoc.DubboProtocCompilerMojo use it , and It will help me find the pluginWrapper class based on the operating system

.licenserc.yaml Show resolved Hide resolved
NOTICE Outdated
Comment on lines 26 to 39
Maven Protocol Buffers Plugin includes a binary distribution of WinRun4J,
which is used to execute protoc plugins written in Java
under 32-bit and 64-bit Windows operating systems.

WinRun4J is licensed under the Common Public License (CPL).
http://www.eclipse.org/legal/cpl-v10.html

Additional information about WinRun4J is available on
the project's home page:
http://winrun4j.sourceforge.net/

For information about the bundled versions of the binaries
please read src/main/resources/winrun4j/README.txt
inside this git repository.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

These lines can be removed

Copy link
Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ok,fixed

Copy link
Member

@EarthChen EarthChen left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@sonarcloud
Copy link

sonarcloud bot commented Oct 19, 2023

Kudos, SonarCloud Quality Gate passed!    Quality Gate passed

Bug A 0 Bugs
Vulnerability A 0 Vulnerabilities
Security Hotspot A 0 Security Hotspots
Code Smell A 66 Code Smells

0.0% 0.0% Coverage
0.0% 0.0% Duplication

@EarthChen EarthChen merged commit d0c41f5 into apache:3.3 Oct 19, 2023
14 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

6 participants