rust-analyzer/editors/code/src
bors[bot] 8489145583
Merge #5202
5202: Runnable env r=matklad a=vsrs

This PR adds on option to specify (in the settings.json) environment variables passed to the runnable.
The simplest way for all runnables in a bunch:
```jsonc
    "rust-analyzer.runnableEnv": {
        "RUN_SLOW_TESTS": "1"
    }
```

Or it is possible to specify vars more granularly:
```jsonc
    "rust-analyzer.runnableEnv": [
        {
            // "mask": null, // null mask means that this rule will be applied for all runnables
            env: {
                 "APP_ID": "1",
                 "APP_DATA": "asdf"
            }
        },
        {
            "mask": "test_name",
            "env": {
                 "APP_ID": "2", // overwrites only APP_ID
            }
        }
    ]
```

You can use any valid RegExp as a mask. Also note that a full runnable name is something like *run bin_or_example_name*, *test some::mod::test_name* or *test-mod some::mod*, so it is possible to distinguish binaries, single tests, and test modules with this masks: `"^run"`, `"^test "` (the trailing space matters!), and `"^test-mod"` respectively.

Fixes #4450

I suppose this info should be somewhere in the docs, but unsure where is the best place.

Co-authored-by: vsrs <vit@conrlab.com>
2020-07-03 13:17:36 +00:00
..
ast_inspector.ts Flatten commands.ts 2020-05-25 12:14:44 +02:00
client.ts Pass CodeActionKind through our middleware to populate menus 2020-07-02 17:13:03 -04:00
commands.ts Add reload workspace command 2020-07-01 14:57:59 +02:00
config.ts code linting 2020-07-03 14:23:51 +03:00
ctx.ts Implement StatusBar 2020-07-02 15:32:14 +02:00
debug.ts Add tests 2020-07-03 14:23:51 +03:00
inlay_hints.ts Cleanup lsp extensions on the client side 2020-05-25 14:56:26 +02:00
lsp_ext.ts Implement StatusBar 2020-07-02 15:32:14 +02:00
main.ts Merge #5089 #5161 #5184 #5185 #5186 2020-07-02 09:12:46 +00:00
net.ts Append 10 random hex chars to temp artifact files 2020-06-25 01:00:30 +03:00
persistent_state.ts Rewrite auto-update 2020-03-19 09:04:59 +01:00
run.ts Fix workspaceRoot 2020-07-03 14:56:30 +03:00
snippets.ts Less rust-analyzer specific onEnter 2020-05-25 14:28:47 +02:00
tasks.ts Fix ts lints 2020-06-24 12:30:41 +03:00
toolchain.ts Change Runnable.bin -> Runnable.kind 2020-05-31 05:21:45 +03:00
util.ts Never disable error logging on the frontend 2020-06-22 21:30:32 +03:00