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 functions for tox crate version information #477

Open
wants to merge 4 commits into
base: master
Choose a base branch
from

Conversation

antis81
Copy link

@antis81 antis81 commented Nov 23, 2023

Adds functions to query and display the tox crate version during runtime.

  • tox::tox_node::crate_version -> String
  • tox::tox_node::crate_version_major -> u32
  • tox::tox_node::crate_version_minor -> u32
  • tox::tox_node::crate_version_patch -> u32

@kpp
Copy link
Member

kpp commented Dec 13, 2023

Would you please explain what you are fixing by this PR? Can you add more context? Error messages?

@antis81
Copy link
Author

antis81 commented Dec 13, 2023

Actually this feature is available in c-toxcore (for example here). The PR adds those API calls to the "tox" crate. Might be better suited in both "tox" and "tox_core" crate though. This allows to query and display (meta) information about the tox(_core) crate at runtime.

tox/src/lib.rs Outdated Show resolved Hide resolved
tox/src/lib.rs Outdated Show resolved Hide resolved
@coveralls
Copy link

coveralls commented Dec 18, 2023

Pull Request Test Coverage Report for Build 7247588774

  • 19 of 19 (100.0%) changed or added relevant lines in 1 file are covered.
  • 13 unchanged lines in 7 files lost coverage.
  • Overall coverage decreased (-0.03%) to 94.85%

Files with Coverage Reduction New Missed Lines %
tox_core/src/net_crypto/mod.rs 1 98.47%
tox_core/src/state_format/old.rs 1 85.11%
tox_packet/src/dht/errors.rs 1 75.0%
tox_core/src/onion/client/paths_pool.rs 2 85.47%
tox_packet/src/onion/mod.rs 2 93.62%
tox_core/src/relay/links.rs 3 98.3%
tox_node/src/node_config.rs 3 72.92%
Totals Coverage Status
Change from base Build 5022320978: -0.03%
Covered Lines: 16816
Relevant Lines: 17729

💛 - Coveralls

@antis81 antis81 requested a review from kpp December 22, 2023 15:26
@kpp
Copy link
Member

kpp commented Dec 23, 2023

Ok good. Can you integrate these functions into Tox-node?

@antis81
Copy link
Author

antis81 commented Jan 16, 2024

Okay I moved the version info into the tox_node crate together with the version context. Now we have a "human readable" form in addition to this somewhat "cryptic" versioning scheme. However for the time being I say it is fine.

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

3 participants