Skip to content

Conversation

ZR233
Copy link
Contributor

@ZR233 ZR233 commented Jul 21, 2025

Re-export the dependency types used by the API, so that users don't have to manage the versions of transitive dependencies, and multiple versions can coexist.

@ZR233 ZR233 requested review from aarkegz and hky1999 July 21, 2025 01:16

use axerrno::AxError;
use memory_set::MappingError;
pub use axerrno::AxError;
Copy link
Contributor

Choose a reason for hiding this comment

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

Why this necessary?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

  1. 使用者不需要去挨个添加这些结构体所在的crate,只用依赖这一个crate.
  2. 如果依赖这个crate, 这个crate axerrno 版本是 0.1 , 而自身又要使用 axerrno 0.2, 将会造成不兼容,若其他crate 用了 axerrno 0.3 并且也没重新导出,则更加无法兼容,除非修改所有依赖的crate axerrno 版本,否则无法使用。若都使用重新导出的方式,则 0.1 0.2 0.3 可以共存。可参照 aarch64-cpu crate,重新导出了tock-registors, arceos- 0.9 0.8 0.10 版本的tock-registors 同时存在

@ZR233 ZR233 requested a review from aarkegz July 26, 2025 12:21
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