Skip to content

Scheme to store JSON files of DbFunction info #109

@zjp-CN

Description

@zjp-CN

Scheme 1: base_folder/src_file_path/function_name

function_name will contains / and some punctuations, which is tricky to create the desired file:

distributed-verification $ verify_rust_std split --db artifacts/artifact-libcore/core.sqlite3 --base tmp/json
[src/db/mod.rs:55:9] &path_buf = "tmp/json/core/src/fmt/float.rs"
[src/db/mod.rs:55:9] &path_buf = "tmp/json/core/src/num/shells/int_macros.rs"
[src/db/mod.rs:55:9] &path_buf = "tmp/json/core/src/num/int_macros.rs"
[src/db/mod.rs:55:9] &path_buf = "tmp/json/core/src/ptr/non_null.rs"
Error:
   0: No such file or directory (os error 2)

Location:
   src/db/split_to_json.rs:39

  ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ SPANTRACE ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━

   0: distributed_verification::db::split_to_json::write json with path=tmp/json/core/src/ptr/non_null.rs/ptr::non_null::NonNull::<T>::write::
kani_force_fn_once::<(), {closure@/home/runner/work/distributed-verification/distributed-verification/verify-rust-std/library/core/src/ptr/non
_null.rs:1251:22: 1251:51}>
      at src/db/split_to_json.rs:37

Scheme 2: base_folder/src_file_path/function_name/DbFunction.json

mkdir: cannot create directory ‘../tmp/split/core/src/iter/adapters/chain.rs/<iter::adapters::chain::Chain<iter::adapters::flatten
::Flatten<option::IntoIter<char::EscapeDebug>>, iter::adapters::flatten::FlatMap<str::iter::Chars<'_>, char::EscapeDebug, str::Cha
rEscapeDebugContinue>> as iter::traits::iterator::Iterator>::next::{closure#0}’: File name too long

Scheme 3: base_folder/src_file_path.json

All functions in the src_file_path will merged in to a json. This is handy to store, but will bad to fetch from web frontend because querying single function requires downloading the whole functions in the same src path. And it'll vastly bloat when storing history of a function.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions