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

add com.janeluo.ikkanalyzer dependency to core model #2206

Merged
merged 5 commits into from
Jun 20, 2023
Merged

add com.janeluo.ikkanalyzer dependency to core model #2206

merged 5 commits into from
Jun 20, 2023

Conversation

KeeProMise
Copy link
Member

When I run the code in the example to learn the database, I find that the class org/wltea/analyzer/core/IKSegmenter cannot be found. The scope of this class in the module core is provided, and the module example depends on the module core.
2581683535433_ pic
2591683535489_ pic

@imbajin
Copy link
Member

imbajin commented May 8, 2023

Yep, because it's under the GPL license which is not compatible with Apache License 2.0, so we have to set the scope to provided and let users to download & config it by themselves 😿

But we do lack the doc to tell the users (so as the mysql dependency - refer #2175 (comment)) , could add some doc & comments in the config template together

And maybe the example should also remove the dependency? @zyxxoo @javeme (also we should enhance the doc for example for new users/devs to start

@imbajin imbajin added dependencies Incompatible dependencies of package doc Document expected apache labels May 8, 2023
@codecov
Copy link

codecov bot commented May 8, 2023

Codecov Report

Merging #2206 (b84308b) into master (267ff6d) will increase coverage by 3.51%.
The diff coverage is n/a.

@@             Coverage Diff              @@
##             master    #2206      +/-   ##
============================================
+ Coverage     61.53%   65.04%   +3.51%     
- Complexity      484      979     +495     
============================================
  Files           497      498       +1     
  Lines         40572    40681     +109     
  Branches       5663     5681      +18     
============================================
+ Hits          24965    26461    +1496     
+ Misses        13061    11595    -1466     
- Partials       2546     2625      +79     

see 31 files with indirect coverage changes

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

@KeeProMise
Copy link
Member Author

Yep, because it's under the GPL license which is not compatible with Apache License 2.0, so we have to set the scope to provided and let users to download & config it by themselves 😿

But we do lack the doc to tell the users (so as the mysql dependency - refer #2175 (comment)) , could add some doc & comments in the config template together

And maybe the example should also remove the dependency? @zyxxoo @javeme (also we should enhance the doc for example for new users/devs to start

Is it possible to provide a readme in the module example, explaining the dependencies

@imbajin
Copy link
Member

imbajin commented May 8, 2023

Is it possible to provide a readme in the module example, explaining the dependencies

Yep, should add the doc/comments in these spaces:

  1. add the details in the doc repo to tell users how to config the dependence (like ikka/mysql)
  2. refer a doc link in the README.md for users to know this ⚠️
  3. add the comment in config template to remind users to view doc link configuration (could also add the comment in the relative code 👨🏻‍💻)

@liuxiaocs7
Copy link
Member

liuxiaocs7 commented May 30, 2023

Same question, hi, @imbajin

Yep, because it's under the GPL license which is not compatible with Apache License 2.0, so we have to set the scope to provided and let users to download & config it by themselves 😿

The ik tokenizer we used seems to be this one: https://mvnrepository.com/artifact/com.janeluo/ikanalyzer/2012_u6 rather than https://github.com/blueshen/ik-analyzer

<dependency>
<groupId>com.janeluo</groupId>
<artifactId>ikanalyzer</artifactId>
<version>${ikanalyzer.version}</version>
<scope>provided</scope>
</dependency>

The license from mvn website, does it meet the requirements?

image

Also this one works fine by installing in local repository.

@imbajin
Copy link
Member

imbajin commented May 30, 2023

Same question, hi, @imbajin

Yep, because it's under the GPL license which is not compatible with Apache License 2.0, so we have to set the scope to provided and let users to download & config it by themselves 😿

The ik tokenizer we used seems to be this one: mvnrepository.com/artifact/com.janeluo/ikanalyzer/2012_u6 rather than blueshen/ik-analyzer

<dependency>
<groupId>com.janeluo</groupId>
<artifactId>ikanalyzer</artifactId>
<version>${ikanalyzer.version}</version>
<scope>provided</scope>
</dependency>

The license from mvn website, does it meet the requirements?

image

Also this one works fine by installing in local repository.

Thanks for the reminder, I thinks it's fine to use it (but not sure)

@javeme @zyxxoo Is it possible to adopt other implements? Consider replacing it

@javeme
Copy link
Contributor

javeme commented May 30, 2023

I think the ikanalyzer license is Apache compatible, but not sure the reason we removed ikanalyzer from #2100

@zyxxoo
Copy link
Contributor

zyxxoo commented May 31, 2023

OK, It seems that we can now use this dependency. @KeeProMise @liuxiaocs7

@KeeProMise
Copy link
Member Author

OK, It seems that we can now use this dependency. @KeeProMise @liuxiaocs7

I think that since ikanalyzer can be used in the core module, it can also be used in the example module.

@imbajin
Copy link
Member

imbajin commented Jun 2, 2023

OK, It seems that we can now use this dependency. @KeeProMise @liuxiaocs7

I think that since ikanalyzer can be used in the core module, it can also be used in the example module.

yep, just fix the dependence check (refer here, then we could merge it back)

image

And we could also add the dependence doc in the PR template or Wiki? (for others to know it)

@KeeProMise KeeProMise changed the title add com.janeluo.ikkanalyzer dependency to example model add com.janeluo.ikkanalyzer dependency to core model Jun 2, 2023
@KeeProMise
Copy link
Member Author

com.janeluo.ikkanalyze、lucene-queries-4.7.2.jar、lucene-queryparser-4.7.2.jar 、lucene-sandbox-4.7.2.jar is Apache 2.0, so I added the above-mentioned third-party dependencies in the known-dependencies.txt file, and added com.janeluo.ikkanalyze to the core module

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

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

Thanks for the contribution, and if we add a new dependency in project, we need also update the info in LICENSE & NOTICE file both in the root & dist modules (depend on source or binary dependency)

@simon824 remove provided option, shall we add/update info in dist (LICENSE & NOTICE) file (seems yes?)
And we need a doc to help new devs know how to add/update the info

@imbajin imbajin requested a review from simon824 June 3, 2023 09:49
@simon824
Copy link
Member

simon824 commented Jun 6, 2023

Hi @KeeProMise ,
If we want to add a new third-party dependency we need to do the following things:

  1. Find the third-party dependency repository, and put the dependency license file in [./hugegraph-dist/release-docs/licenses/](https://github.com/apache/incubator-hugegraph/tree/master/hugegraph -dist/release-docs/licenses) path.
  2. Declare the dependency in ./hugegraph-dist/release-docs/LICENSE LICENSE information.
  3. Find the NOTICE file in the repository and append it to [./hugegraph-dist/release-docs/NOTICE](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/release-docs /NOTICE) (skip this step if there is no NOTICE file).
  4. Execute script ./hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh to update dependency list known-dependencies.txt (or manually update).

Update: refer with example

@KeeProMise
Copy link
Member Author

Hi @KeeProMise , If we want to add a new third-party dependency we need to do the following things:

  1. Find the third-party dependency repository, and put the dependency license file in [./hugegraph-dist/release-docs/licenses/](https://github.com/apache/incubator-hugegraph/tree/master/hugegraph -dist/release-docs/licenses) path.
  2. Declare the dependency in ./hugegraph-dist/release-docs/LICENSE LICENSE information.
  3. Find the NOTICE file in the repository and append it to [./hugegraph-dist/release-docs/NOTICE](https://github.com/apache/incubator-hugegraph/blob/master/hugegraph-dist/release-docs /NOTICE) (skip this step if there is no NOTICE file).
  4. Execute script ./hugegraph-dist/scripts/dependency/regenerate_known_dependencies.sh to update dependency list known-dependencies.txt (or manually update).

Thank you for your guidance. I'll do it

@KeeProMise
Copy link
Member Author

The third-party dependency does not have a NOTICE file, so I took these three steps:

  1. Find the third party dependency repository, and put the dependency license file in ./huggegraph-dist/release docs/licenses/ path

  2. Declare the dependency in /Hugegraph-dist/release-docs/License License information

  3. Execute script /Hugegraph-dist/scripts/dependency/regenerate_ Known_ Dependencies. sh to update dependency list knowledge dependencies. txt

@KeeProMise KeeProMise requested a review from imbajin June 7, 2023 07:13
Copy link
Member

@imbajin imbajin Jun 7, 2023

Choose a reason for hiding this comment

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

@simon824 can we ignore the standard Apache 2.0 license file? (seems they are duplicate?)

Copy link
Member

Choose a reason for hiding this comment

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

Not sure, I'll check it

Copy link
Contributor

@javeme javeme left a comment

Choose a reason for hiding this comment

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

LGTM

Copy link
Member

@imbajin imbajin left a comment

Choose a reason for hiding this comment

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

@imbajin imbajin merged commit 258d181 into apache:master Jun 20, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
apache dependencies Incompatible dependencies of package doc Document expected
Projects
Status: Done
Development

Successfully merging this pull request may close these issues.

6 participants