Skip to content

refactor: project structure#130

Merged
messense merged 1 commit intomessense:mainfrom
tisonkun:dev
Jul 31, 2025
Merged

refactor: project structure#130
messense merged 1 commit intomessense:mainfrom
tisonkun:dev

Conversation

@tisonkun
Copy link
Contributor

cc @messense

I'd go through the codebase and pick up some issues to try them out. But first try to sort out the structure for further development.

What do you think?

Signed-off-by: tison <wander4096@gmail.com>
Copy link
Contributor Author

Choose a reason for hiding this comment

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

Maybe further refactor to a build.rs in jieba-rs's crate.

Copy link
Owner

Choose a reason for hiding this comment

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

this was converted from build.rs in #117

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Interesting.

Do you have some preference on these different methods? I personally consider that code generation in this case can be easy to debug and reduce an extra crate in the dep tree to maintain.

surrealdb/surrealdb#4556 (comment) looks weird. Clippy rules should not affect dependencies. And if they don't need certain features, opt-out the feature should opt-out the related code also.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

If they'd prefer include_str over fs, it's possible when using build.rs actually.

Copy link
Owner

Choose a reason for hiding this comment

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

I don't think it's clippy, they are using https://crates.io/crates/cargo-acl.

I don't have a strong preference here, both build.rs & proc macro have advantages and disadvantages. IMO the current proc maco impl does not use syn so compile time should be fine.

@codecov
Copy link

codecov bot commented Jul 30, 2025

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 83.25%. Comparing base (3f79e15) to head (2e6d143).
⚠️ Report is 1 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #130   +/-   ##
=======================================
  Coverage   83.25%   83.25%           
=======================================
  Files           9        9           
  Lines        1750     1750           
=======================================
  Hits         1457     1457           
  Misses        293      293           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codspeed-hq
Copy link

codspeed-hq bot commented Jul 30, 2025

CodSpeed Performance Report

Merging #130 will create unknown performance changes

Comparing tisonkun:dev (2e6d143) with main (3f79e15)

Summary

🆕 12 new benchmarks
⁉️ 12 dropped benchmarks

⚠️ Please fix the performance issues or acknowledge them on CodSpeed.

Benchmarks breakdown

Benchmark BASE HEAD Change
⁉️ cut_all 34.6 µs N/A N/A
⁉️ cut_for_search 65.6 µs N/A N/A
⁉️ no_hmm 42.9 µs N/A N/A
⁉️ with_hmm 59 µs N/A N/A
⁉️ new 409.1 ms N/A N/A
⁉️ tag 62.5 µs N/A N/A
⁉️ textrank 87 µs N/A N/A
⁉️ tfidf 60.8 µs N/A N/A
⁉️ multi_thread 28.4 ms N/A N/A
⁉️ single_thread 27 ms N/A N/A
⁉️ default_mode 60.4 µs N/A N/A
⁉️ search_mode 65 µs N/A N/A
🆕 cut_all N/A 34.6 µs N/A
🆕 cut_for_search N/A 65.7 µs N/A
🆕 no_hmm N/A 42.9 µs N/A
🆕 with_hmm N/A 59 µs N/A
🆕 new N/A 409.3 ms N/A
🆕 tag N/A 62.6 µs N/A
🆕 textrank N/A 86.9 µs N/A
🆕 tfidf N/A 60.8 µs N/A
... ... ... ... ...

ℹ️ Only the first 20 benchmarks are displayed. Go to the app to view all benchmarks.

Copy link
Owner

@messense messense left a comment

Choose a reason for hiding this comment

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

Thanks

@messense messense merged commit 3bde20c into messense:main Jul 31, 2025
9 of 10 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.

2 participants