Skip to content

Expected archive schema string does not match generated resource schema. #233

@hallahan

Description

@hallahan

I am on the latest commit of master (b1d77cb), and I am having issues with loading archives after modifying the schema. Playing around with osmflat-rs, I added a few things to the schema. I am able to compile OSM data fine, but when I try and open an archive (using the debug example), I get ResourceStorageError.WrongSignature.

Digging in a bit, it looks like flatdata-generator and the archive.schema written to the data directory do not match with their tags. The check to see if the stored schema and expected schema is simply doing a string compare, and this fails.

        if stored_schema != expected_schema {
            return Err(ResourceStorageError::WrongSignature {
                resource_name: resource_name.into(),
                diff: compute_diff(stored_schema, expected_schema),
            });
        }

I generate the rust file like so:

flatdata-generator -s /Users/n/code/osmflat-rs/flatdata/osm.flatdata -g rust -O /Users/n/code/osmflat-rs/osmflat/src/exp_gen.rs 

From the generated file, the OSM raw string representing the schema does not have a tab indenting the contents of the namespace. The archive.schema file does.

Screen Shot 2022-10-25 at 2 05 57 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions