Skip to content

Commit f8ec78f

Browse files
committed
Merge branch 'release/v2.3.1'
2 parents 97a520d + 17cf795 commit f8ec78f

File tree

6 files changed

+174
-77
lines changed

6 files changed

+174
-77
lines changed

CHANGELOG.md

Lines changed: 46 additions & 34 deletions
Original file line numberDiff line numberDiff line change
@@ -1,21 +1,33 @@
11
# Release Notes
22

3-
## 2.3.0 (2021-??-??)
3+
## 2.3.1 (2021-03-23)
4+
5+
- Added a new setting ``platformio-ide.autoOpenPlatformIOIniFile`` to control an automatic opening of the `platformio.ini` file from a project when no other editors are opened (issue [#2419](https://github.com/platformio/platformio-vscode-ide/issues/2419))
6+
- Added a new setting ``platformio-ide.activateProjectOnTextEditorChange`` to enable automatic project activation depending on an active opened text editor (issue [#2410](https://github.com/platformio/platformio-vscode-ide/issues/2410))
7+
- Automatically activate project environment opened via "PIO Home > New Project / Open Project" (issue [#2414](https://github.com/platformio/platformio-vscode-ide/issues/2414))
8+
- Do not show "Default" environment when a project does not have any build environments (issue [#2450](https://github.com/platformio/platformio-vscode-ide/issues/2450))
9+
- Fixed an issue "Failed to load symbols from executable file" when debugging native/desktop application
10+
- PlatformIO IDE Installer
11+
* Updated PlatformIO Core installer to v1.0.1
12+
* Rebuild project index only when the environment changes
13+
* Fixed an issue "The 'path' argument must be of type string. Received undefined"
14+
15+
## 2.3.0 (2021-03-03)
416

517
**Requires PlatformIO Core 5.1 or above**
618

7-
* Project management:
8-
- Show active project in the status bar (issue [#2276](https://github.com/platformio/platformio-vscode-ide/issues/2276))
9-
- Automatically switch to the latest project on restart (issue [#2365](https://github.com/platformio/platformio-vscode-ide/issues/2365))
10-
- Automatically restore the latest project environment (issue [#2344](https://github.com/platformio/platformio-vscode-ide/issues/2344))
11-
* Allowed passing custom base URL of the Python Package Index using new `customPyPiIndexUrl` setting
12-
* Open ["platformio.ini" configuration file](https://docs.platformio.org/page/projectconf/index.html) from newly added project (if there are no other active editors) (issue [#2263](https://github.com/platformio/platformio-vscode-ide/issues/2263))
13-
* Updated PlatformIO Core installer to v1.0.0 ([release notes](https://github.com/platformio/platformio-core-installer/releases/tag/v1.0.0))
14-
* Added protection for infinite IntelliSense index rebuilding (issue [#2363](https://github.com/platformio/platformio-vscode-ide/issues/2363))
15-
* Added "OpenAPI (Swagger) Editor" extension to the conflicted list (issue [#2324](https://github.com/platformio/platformio-vscode-ide/issues/2324))
16-
* Fixed issues when the "Upload and Monitor" command didn't terminate the running task and didn't reopen a monitor with delay (issue [#2266](https://github.com/platformio/platformio-vscode-ide/issues/2266), issue [#2319](https://github.com/platformio/platformio-vscode-ide/issues/2319))
17-
* Fixed an issue with broken IntelliSense index rebuilding or tasks loading for big projects (issue [#2321](https://github.com/platformio/platformio-vscode-ide/issues/2321))
18-
* Fixed an issue when a debug breakpoint was not allowed for Assembly files
19+
- Project management:
20+
* Show active project in the status bar (issue [#2276](https://github.com/platformio/platformio-vscode-ide/issues/2276))
21+
* Automatically switch to the latest project on restart (issue [#2365](https://github.com/platformio/platformio-vscode-ide/issues/2365))
22+
* Automatically restore the latest project environment (issue [#2344](https://github.com/platformio/platformio-vscode-ide/issues/2344))
23+
- Allowed passing custom base URL of the Python Package Index using new `customPyPiIndexUrl` setting
24+
- Open ["platformio.ini" configuration file](https://docs.platformio.org/page/projectconf/index.html) from newly added project (if there are no other active editors) (issue [#2263](https://github.com/platformio/platformio-vscode-ide/issues/2263))
25+
- Updated PlatformIO Core installer to v1.0.0 ([release notes](https://github.com/platformio/platformio-core-installer/releases/tag/v1.0.0))
26+
- Added protection for infinite IntelliSense index rebuilding (issue [#2363](https://github.com/platformio/platformio-vscode-ide/issues/2363))
27+
- Added "OpenAPI (Swagger) Editor" extension to the conflicted list (issue [#2324](https://github.com/platformio/platformio-vscode-ide/issues/2324))
28+
- Fixed issues when the "Upload and Monitor" command didn't terminate the running task and didn't reopen a monitor with delay (issue [#2266](https://github.com/platformio/platformio-vscode-ide/issues/2266), issue [#2319](https://github.com/platformio/platformio-vscode-ide/issues/2319))
29+
- Fixed an issue with broken IntelliSense index rebuilding or tasks loading for big projects (issue [#2321](https://github.com/platformio/platformio-vscode-ide/issues/2321))
30+
- Fixed an issue when a debug breakpoint was not allowed for Assembly files
1931

2032
## 2.2.1 (2020-11-12)
2133

@@ -50,36 +62,36 @@
5062

5163
## 2.1.0 (2020-09-16)
5264

53-
* Added a new setting ``platformio-ide.autoPreloadEnvTasks`` to enable automatic preloading of the project environment tasks (issue [#2004](https://github.com/platformio/platformio-vscode-ide/issues/2004))
54-
* Renamed "PIO Remote" group of tasks to "Remote Development"
55-
* Updated PlatformIO Core installer to [v0.3.5](https://github.com/platformio/platformio-core-installer/releases/tag/v0.3.5)
65+
- Added a new setting ``platformio-ide.autoPreloadEnvTasks`` to enable automatic preloading of the project environment tasks (issue [#2004](https://github.com/platformio/platformio-vscode-ide/issues/2004))
66+
- Renamed "PIO Remote" group of tasks to "Remote Development"
67+
- Updated PlatformIO Core installer to [v0.3.5](https://github.com/platformio/platformio-core-installer/releases/tag/v0.3.5)
5668

5769
## 2.0.1 (2020-09-10)
5870

59-
* Moved "Project Tasks" view back to "PlatformIO" activity (you can now drag it to any location)
71+
- Moved "Project Tasks" view back to "PlatformIO" activity (you can now drag it to any location)
6072

6173
## 2.0.0 (2020-09-10)
6274

6375
**Requires PlatformIO Core 5.0 or above**
6476
**Requires VSCode 1.44 or above**
6577

66-
* New PlatformIO Task Explorer
67-
- Instant access to the Project Tasks within the VSCode Explorer
68-
- Grouped tasks: Generic, Advanced, PIO Remote, Platform, Custom, etc.
69-
- Support for PlatformIO dev-platform tasks (Program FPGA bitstream, Burn bootloader, Upload to FS, OTA Update, etc). The list of tasks depends on a particular dev-platform
70-
- Access to [User Custom Targets](https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#custom-targets)
71-
* New Project Environment Switcher
72-
- Switch between project environments declared in [platformio.ini](https://docs.platformio.org/en/latest/projectconf/index.html) project configuration file (issue [#544](https://github.com/platformio/platformio-vscode-ide/issues/544))
73-
- Activate IntelliSense service based on the current environment
74-
- Automatically generate a debugging configuration for the active environment
75-
* New PlatformIO IDE Installer
76-
- Added progress information
77-
- Switched to the cross-platform and portable [get-platformio.py](https://github.com/platformio/platformio-core-installer) installer script
78-
- Use built-in portable Python 3 on Windows and macOS (it can be disabled with ``platformio-ide.useBuiltinPython`` setting)
79-
* Added support for ``extends`` option in ``platformio.ini`` project configuration file (issue [#1371](https://github.com/platformio/platformio-vscode-ide/issues/1371))
80-
* Contribute PlatformIO Core CLI into VSCode's default Terminal
81-
* Reduced startup time (PlatformIO Core verification process)
82-
* Fixed a bug when hotkeys in PlatformIO Home did not work on macOS (issue [#606](https://github.com/platformio/platformio-vscode-ide/issues/606))
78+
- New PlatformIO Task Explorer
79+
* Instant access to the Project Tasks within the VSCode Explorer
80+
* Grouped tasks: Generic, Advanced, PIO Remote, Platform, Custom, etc.
81+
* Support for PlatformIO dev-platform tasks (Program FPGA bitstream, Burn bootloader, Upload to FS, OTA Update, etc). The list of tasks depends on a particular dev-platform
82+
* Access to [User Custom Targets](https://docs.platformio.org/en/latest/projectconf/advanced_scripting.html#custom-targets)
83+
- New Project Environment Switcher
84+
* Switch between project environments declared in [platformio.ini](https://docs.platformio.org/en/latest/projectconf/index.html) project configuration file (issue [#544](https://github.com/platformio/platformio-vscode-ide/issues/544))
85+
* Activate IntelliSense service based on the current environment
86+
* Automatically generate a debugging configuration for the active environment
87+
- New PlatformIO IDE Installer
88+
* Added progress information
89+
* Switched to the cross-platform and portable [get-platformio.py](https://github.com/platformio/platformio-core-installer) installer script
90+
* Use built-in portable Python 3 on Windows and macOS (it can be disabled with ``platformio-ide.useBuiltinPython`` setting)
91+
- Added support for ``extends`` option in ``platformio.ini`` project configuration file (issue [#1371](https://github.com/platformio/platformio-vscode-ide/issues/1371))
92+
- Contribute PlatformIO Core CLI into VSCode's default Terminal
93+
- Reduced startup time (PlatformIO Core verification process)
94+
- Fixed a bug when hotkeys in PlatformIO Home did not work on macOS (issue [#606](https://github.com/platformio/platformio-vscode-ide/issues/606))
8395

8496
## 1.10.0 (2019-11-20)
8597

package.json

Lines changed: 17 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "platformio-ide",
3-
"version": "2.3.0",
3+
"version": "2.3.1",
44
"publisher": "platformio",
55
"engines": {
66
"vscode": "^1.44.0"
@@ -517,6 +517,16 @@
517517
"default": false,
518518
"description": "Activate the PlatformIO extension only when a PlatformIO-based project (with `platformio.ini`) is opened in the workspace"
519519
},
520+
"platformio-ide.activateProjectOnTextEditorChange": {
521+
"type": "boolean",
522+
"default": false,
523+
"description": "Automatically activate project depending on an active opened text editor"
524+
},
525+
"platformio-ide.autoOpenPlatformIOIniFile": {
526+
"type": "boolean",
527+
"default": true,
528+
"description": "Automatically open the `platformio.ini` file from a project when no other editors are opened"
529+
},
520530
"platformio-ide.autoCloseSerialMonitor": {
521531
"type": "boolean",
522532
"default": true,
@@ -606,25 +616,25 @@
606616
"vscode:package": "webpack --mode production && vsce package"
607617
},
608618
"devDependencies": {
609-
"@babel/core": "~7.13.8",
619+
"@babel/core": "~7.13.10",
610620
"@types/node": "~12",
611621
"@types/vscode": "~1.44.0",
612622
"babel-eslint": "~10.1.0",
613623
"babel-loader": "~8.2.2",
614624
"babel-plugin-transform-class-properties": "~6.24.1",
615625
"babel-preset-env": "~1.7.0",
616-
"eslint": "~7.21.0",
626+
"eslint": "~7.22.0",
617627
"eslint-import-resolver-webpack": "~0.13.0",
618628
"eslint-plugin-import": "~2.22.1",
619629
"prettier": "~2.2.1",
620-
"vsce": "~1.85.1",
621-
"webpack": "~5.24.2",
630+
"vsce": "~1.87.0",
631+
"webpack": "~5.27.2",
622632
"webpack-cli": "~4.5.0"
623633
},
624634
"dependencies": {
625635
"fs-plus": "~3.1.1",
626-
"platformio-node-helpers": "~9.1.1",
627-
"platformio-vscode-debug": "~1.3.0"
636+
"platformio-node-helpers": "~9.1.2",
637+
"platformio-vscode-debug": "~1.3.1"
628638
},
629639
"extensionDependencies": [
630640
"ms-vscode.cpptools"

src/home.js

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,13 @@ export default class PIOHome {
9797
port: extension.getSetting('pioHomeServerHttpPort'),
9898
onIDECommand: async (command, params) => {
9999
if (command === 'open_project') {
100+
if (extension.projectObservable) {
101+
extension.projectObservable.saveProjectStateItem(
102+
vscode.Uri.file(params).fsPath,
103+
'activeEnv',
104+
undefined
105+
);
106+
}
100107
this.disposePanel();
101108
if (vscode.workspace.workspaceFolders) {
102109
vscode.workspace.updateWorkspaceFolders(

src/installer/python-prompt.js

Lines changed: 21 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -16,13 +16,15 @@ export default class PythonPrompt {
1616

1717
async prompt() {
1818
const selectedItem = await vscode.window.showInformationMessage(
19-
'PlatformIO: Can not find working Python 2.7 or 3.5+ Interpreter. Please install the latest Python 3 and restart VSCode',
19+
'PlatformIO: Can not find working Python 3.6+ Interpreter. Please install the latest Python 3 and restart VSCode',
2020
{ title: 'Install Python', isCloseAffordance: false },
2121
{ title: 'I have Python', isCloseAffordance: false },
2222
{ title: 'Try again', isCloseAffordance: false },
2323
{ title: 'Abort PlatformIO IDE Installation', isCloseAffordance: true }
2424
);
2525

26+
let result = { status: this.STATUS_TRY_AGAIN };
27+
let pythonExecutable = undefined;
2628
switch (selectedItem ? selectedItem.title : undefined) {
2729
case 'Install Python':
2830
vscode.commands.executeCommand(
@@ -31,21 +33,26 @@ export default class PythonPrompt {
3133
'http://docs.platformio.org/page/faq.html#install-python-interpreter'
3234
)
3335
);
34-
return { status: this.STATUS_TRY_AGAIN };
36+
break;
3537
case 'I have Python':
36-
return {
37-
status: this.STATUS_CUSTOMEXE,
38-
pythonExecutable: await vscode.window.showInputBox({
39-
prompt: 'Please specify a full path to Python executable file',
40-
placeHolder: 'Full path to python/python.exe',
41-
validateInput: (value) =>
42-
!fs.isFileSync(value) ? 'Invalid path to Python Interpreter' : null,
43-
}),
44-
};
38+
pythonExecutable = await vscode.window.showInputBox({
39+
prompt: 'Please specify a full path to Python executable file',
40+
placeHolder: 'Full path to python/python.exe',
41+
validateInput: (value) =>
42+
!fs.isFileSync(value) ? 'Invalid path to Python Interpreter' : null,
43+
});
44+
if (pythonExecutable) {
45+
result = {
46+
status: this.STATUS_CUSTOMEXE,
47+
pythonExecutable,
48+
};
49+
}
50+
break;
4551
case 'Abort PlatformIO IDE Installation':
46-
return { status: this.STATUS_ABORT };
47-
default:
48-
return { status: this.STATUS_TRY_AGAIN };
52+
result = { status: this.STATUS_ABORT };
53+
break;
4954
}
55+
56+
return result;
5057
}
5158
}

src/main.js

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ class PlatformIOVSCodeExtension {
2626
this.context = undefined;
2727
this.pioTerm = undefined;
2828
this.pioHome = undefined;
29+
this.projectObservable = undefined;
2930
this.subscriptions = [];
3031

3132
this._enterpriseSettings = undefined;
@@ -84,7 +85,8 @@ class PlatformIOVSCodeExtension {
8485
this.initToolbar({
8586
ignoreCommands: this.getEnterpriseSetting('ignoreToolbarCommands'),
8687
});
87-
this.subscriptions.push(new ProjectObservable());
88+
this.projectObservable = new ProjectObservable();
89+
this.subscriptions.push(this.projectObservable);
8890

8991
this.startPIOHome();
9092

0 commit comments

Comments
 (0)