Skip to content

Overriding the syntax checking target seems to expect different formats for specific keys versus the default key #407

Open
@semicoleon

Description

@semicoleon

Sublime Text Version

3.2.1, Build 3207

Rust Enhanced Version

2.20.0

Operating system

OS Name Microsoft Windows 10 Home
Version 10.0.18362 Build 18362

Expected behavior

The "_default" key for customizing the project target should pass it's value to cargo correctly, just like the specific file keys do.

Actual behavior

The target detector class appears to not call split on default values the way it does for specific matching key value pairs. The debug log produces this

+0.081 Running: cargo check - - l i b --message-format=json --profile=test

Steps to reproduce

  1. Configure a rust project
  2. Customize the target with a projects block in the RustEnhanced sublime settings with a "_default" key and no applicable other keys.
  3. Save a file in the rust project. cargo check will fail and the debug log will contain something similar to the message above. Using specific settings works fine. _default can use an array of strings instead to behave correctly. The settings should probably work one way or the other.

The offending line appears to be target_detect.py 82 _default seems to expect you to manually specify an array of arguments instead of a string, while specific keys (e.g. "lib.rs") only work with a string with spaces between arguments, which are split into an array of strings in the target detector class.

Metadata

Metadata

Assignees

No one assigned

    Labels

    A-target-detectionArea: Automatic cargo target detection

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions