Skip to content

format large minified js with error [RuntimeError: unreachable] #518

Open
@keelii

Description

@keelii

format large minified js with error

dprint 0.36.0
dprint-plugin-typescript version: 0.84.2-2.3.0-x86_64

dprint fmt antd.min.js --verbose

[VERBOSE] Reading file: /Users/***/Library/Caches/dprint/cache/plugin-cache-manifest.json
[VERBOSE] Checking path exists: /Users/***/test/dprint.json
[VERBOSE] Reading file: /Users/***/test/dprint.json
[VERBOSE] Reading file: /Users/***/Library/Caches/dprint/cache/plugins/dprint-plugin-typescript/0.84.2-2.3.0-x86_64
[VERBOSE] Reading file: /Users/***/Library/Caches/dprint/cache/plugins/dprint-plugin-json/0.17.1-2.3.0-x86_64
[VERBOSE] Reading file: /Users/***/Library/Caches/dprint/cache/plugins/dprint-plugin-markdown/0.15.2-2.3.0-x86_64
[VERBOSE] Reading file: /Users/***/Library/Caches/dprint/cache/plugins/dprint-plugin-toml/0.5.4-2.3.0-x86_64
[VERBOSE] Globbing: GlobPatterns { includes: [GlobPattern { relative_pattern: "./antd.min.js", base_dir: CanonicalizedPathBuf { path: "/Users/***/test" } }], excludes: [GlobPattern { relative_pattern: "!**/node_modules", base_dir: CanonicalizedPathBuf { path: "/Users/***/test" } }, GlobPattern { relative_pattern: "!**/*-lock.json", base_dir: CanonicalizedPathBuf { path: "/Users/***/test" } }] }
[VERBOSE] File(s) matched: ["/Users/***/test/antd.min.js"]
[VERBOSE] Finished globbing in 0ms
[VERBOSE] Creating directory: /Users/***/Library/Caches/dprint/cache/incremental
[VERBOSE] Reading file: /Users/***/Library/Caches/dprint/cache/incremental/916624381913923987
[VERBOSE] Max threads: 12
Thread count: 11
[VERBOSE] Creating instance of dprint-plugin-typescript
[VERBOSE] Created instance of dprint-plugin-typescript in 0ms
[VERBOSE] Reading file: /Users/***/test/antd.min.js
WARNING: Formatting is slow for /Users/***/test/antd.min.js
[VERBOSE] Formatted file: /Users/***/test/antd.min.js in 17743ms
Critical error formatting /Users/***/test/antd.min.js. Cannot continue. Message: Originally panicked in dprint-plugin-typescript, then failed reinitialize. This may be a bug in the plugin, the dprint cli is out of date, or the plugin is out of date.
Original error: RuntimeError: unreachable
    at __rg_oom (<module>[3713]:0x286514)
    at __rust_alloc_error_handler (<module>[964]:0xa3362)
    at alloc::alloc::handle_alloc_error::rt_error::h17b448b39cea00a0 (<module>[3766]:0x286e0a)
    at alloc::alloc::handle_alloc_error::h80087a6d84fb07bd (<module>[3763]:0x286cbe)
    at hashbrown::raw::Fallibility::alloc_err::h1dd577d8f98b3c0a (<module>[3752]:0x2867c8)
    at hashbrown::raw::RawTable<T,A>::reserve_rehash::hcba34eefa00d8630 (<module>[3434]:0x271d34)
    at hashbrown::raw::RawTable<T,A>::insert::h5967723d487a33ec (<module>[3436]:0x2721bb)
    at hashbrown::map::HashMap<K,V,S,A>::insert::h650ad67fdcbb83ee (<module>[3460]:0x273398)
    at dprint_core::formatting::ir_helpers::gen_separated_values::get_is_multi_line_for_multi_line::{{closure}}::h6cef31eb2c19910b (<module>[3376]:0x26b83f)
    at dprint_core::formatting::printer::Printer::print::h62ce18644902b670 (<module>[3494]:0x276773)
    at dprint_core::formatting::print::print_with_allocator::h014e1bfeea6128ea (<module>[3365]:0x26a628)
    at dprint_core::formatting::thread_state::with_bump_allocator_mut::h7f05e732b8bacb5f (<module>[550]:0x6a8fc)
    at dprint_plugin_typescript::format_text::inner_format::h1f9af4b1a2c8ca61 (<module>[631]:0x706e1)
    at dprint_plugin_typescript::format_text::format_text::h624a1ee686d016fa (<module>[629]:0x70203)
    at format (<module>[942]:0xa1b2a)
Reinitialize error: RuntimeError: unreachable
    at __rg_oom (<module>[3713]:0x286514)
    at __rust_alloc_error_handler (<module>[964]:0xa3362)
    at alloc::alloc::handle_alloc_error::rt_error::h17b448b39cea00a0 (<module>[3766]:0x286e0a)
    at alloc::alloc::handle_alloc_error::h80087a6d84fb07bd (<module>[3763]:0x286cbe)
    at hashbrown::raw::Fallibility::alloc_err::h1dd577d8f98b3c0a (<module>[3752]:0x2867c8)
    at dprint_core::formatting::printer::Printer::create_save_point::hf3ed01cd3d06c454 (<module>[3496]:0x27813b)
    at dprint_core::formatting::ir_helpers::gen_separated_values::get_is_multi_line_for_multi_line::{{closure}}::h6cef31eb2c19910b (<module>[3376]:0x26b830)
    at dprint_core::formatting::printer::Printer::print::h62ce18644902b670 (<module>[3494]:0x276773)
    at dprint_core::formatting::print::print_with_allocator::h014e1bfeea6128ea (<module>[3365]:0x26a628)
    at dprint_core::formatting::thread_state::with_bump_allocator_mut::h7f05e732b8bacb5f (<module>[550]:0x6a8fc)
    at dprint_plugin_typescript::format_text::inner_format::h1f9af4b1a2c8ca61 (<module>[631]:0x706e1)
    at dprint_plugin_typescript::format_text::format_text::h624a1ee686d016fa (<module>[629]:0x70203)
    at format (<module>[942]:0xa1b2a)
Had 1 error(s) formatting.

https://unpkg.com/[email protected]/dist/antd.min.js

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't workingperformanceMakes the library run faster

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions