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

Build script with vergen collecting system info might take a lot of time #266

Closed
akoptelov opened this issue Nov 14, 2023 · 0 comments · Fixed by #287
Closed

Build script with vergen collecting system info might take a lot of time #266

akoptelov opened this issue Nov 14, 2023 · 0 comments · Fixed by #287

Comments

@akoptelov
Copy link
Contributor

With current usage in vergen crate, sysinfo accesses all filesystems on the host. If there is a network filesystem that cannot be mounted (e.g. it is in a different network), sysinfo's System::new_all() might be stuck for some time.

In my case, this is automount entries with content from my NAS server that causing the issue.

How to reproduce (currently inaccessible network filesystem should exist):
Within a rust project (e.g. created with cargo new vergen-sysinfo-test), create a build.rs with the following content:

fn main() -> Result<(), Box<dyn std::error::Error>> {
    vergen::EmitBuilder::builder().all_sysinfo().emit_and_set()?;
    Ok(())
}

and run

cargo build --verbose
akoptelov added a commit to akoptelov/vergen that referenced this issue Nov 14, 2023
CraZySacX pushed a commit to akoptelov/vergen that referenced this issue Jan 12, 2024
CraZySacX pushed a commit that referenced this issue Jan 13, 2024
CraZySacX added a commit that referenced this issue Jan 14, 2024
* Do not collect disks with si

Fix: #266

* Add `RefreshKind` support to `sysinfo`

* version bump for next release

* Add better doccs to `sysinfo_refresh_kind`

* adjust docs for sysinfo_refresh_kind

---------

Co-authored-by: Alexander Koptelov <alexander.koptelov@viablesystems.io>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
1 participant