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

Slotmap capacity error #381

Open
xangelix opened this issue Sep 19, 2024 · 4 comments
Open

Slotmap capacity error #381

xangelix opened this issue Sep 19, 2024 · 4 comments

Comments

@xangelix
Copy link

I wish I was able to provide more details but I'm unable to replicate this issue outside of the gitlab-runner environment-- so maybe it has to do with an environment variable gitlab introduces? Hopefully I'm not overlooking something obvious here.

I have a workspace with a few crates that each use vergen_gix in the following way:

use vergen_gix::{BuildBuilder, CargoBuilder, Emitter, GixBuilder, RustcBuilder};

pub fn main() {
    let build = BuildBuilder::all_build().unwrap();
    let cargo = CargoBuilder::all_cargo().unwrap();
    let gix = GixBuilder::all_git().unwrap();
    let rustc = RustcBuilder::all_rustc().unwrap();

    Emitter::default()
        .add_instructions(&build)
        .unwrap()
        .add_instructions(&cargo)
        .unwrap()
        .add_instructions(&gix)
        .unwrap()
        .add_instructions(&rustc)
        .unwrap()
        .emit()
        .unwrap();
}
[build-dependencies]
vergen-gix = { version = "1.0.2", features = [
    "build",
    "rustc",
    "cargo",
], default-features = false }

But I get the following errors only when building in the CICD environment.

warning: [email protected]: The slotmap turned out to be too small with 32 entries, would need 4 more
warning: [email protected]: VERGEN_GIT_BRANCH set to default
warning: [email protected]: VERGEN_GIT_COMMIT_AUTHOR_EMAIL set to default
warning: [email protected]: VERGEN_GIT_COMMIT_AUTHOR_NAME set to default
warning: [email protected]: VERGEN_GIT_COMMIT_COUNT set to default
warning: [email protected]: VERGEN_GIT_COMMIT_DATE set to default
warning: [email protected]: VERGEN_GIT_COMMIT_MESSAGE set to default
warning: [email protected]: VERGEN_GIT_COMMIT_TIMESTAMP set to default
warning: [email protected]: VERGEN_GIT_DESCRIBE set to default
warning: [email protected]: VERGEN_GIT_SHA set to default

Any ideas what would be causing a slotmap error like this?

@jasonozias
Copy link
Collaborator

I've never seen that before. I will try to figure out where that is coming from this weekend.

@glennsl
Copy link

glennsl commented Sep 26, 2024

I suddenly started getting this as well after updating my Arch system, although only when building in a Docker container.

My build script is:

use std::error::Error;
use vergen::EmitBuilder;

fn main() -> Result<(), Box<dyn Error>> {
    EmitBuilder::builder()
        .git_branch()
        .git_sha(false)
        .build_date()
        .rustc_semver()
        .sysinfo_user()
        .fail_on_error()
        .emit()?;
    Ok(())
}

And in Cargo.toml:

[build-dependencies]
vergen = { version = "8.1.3", features = ["build", "cargo", "rustc", "si", "git", "gitoxide"] }

@xangelix
Copy link
Author

My CI/CD images are also based on the Arch image, with very minimal configuration, building with rustup, nightly cargo and rustc, so perhaps that could have something to do with it. (Still experiencing this error unfortunately)

@CraZySacX
Copy link
Member

I'll try and reproduce this again this weekend.

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

No branches or pull requests

4 participants