Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 8 additions & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,14 @@ All notable version changes will be recorded in this file.

***

### [v3.26.1] revision

**Fix**:
- `Project Toolchain`: Revert commit 'support generic gcc for arm or riscv projects.'
- `Project Migration`: Fix user context data not migrated. [issues 479](https://github.com/github0null/eide/issues/479)

***

### [v3.26.0] update

**Change**:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@
"homepage": "https://em-ide.com",
"license": "MIT",
"description": "A mcu development environment for 8051/AVR/STM8/Cortex-M/MIPS/RISC-V",
"version": "3.26.0",
"version": "3.26.1",
"preview": false,
"engines": {
"vscode": "^1.67.0"
Expand Down
20 changes: 18 additions & 2 deletions src/EIDEProjectMigration.ts
Original file line number Diff line number Diff line change
Expand Up @@ -6,6 +6,7 @@ import { EIDE_CONF_VERSION, ProjectConfiguration } from "./EIDETypeDefine";
import { compareVersion } from "./utility";
import { view_str$prompt$migrationFailed } from "./StringTable";
import { GlobalEvent } from "./GlobalEvents";
import { getGlobalState } from "./Platform";

export function detectProject(dir: File): boolean {
if (File.IsExist(NodePath.join(dir.path, '.eide', 'eide.yml')))
Expand Down Expand Up @@ -73,8 +74,23 @@ async function _doMigration(projectRootDir: File) {

// rm .eide.usr.ctx.json
const p = NodePath.join(projectRootDir.path, '.eide.usr.ctx.json');
if (File.IsFile(p))
try { fs.unlinkSync(p); } catch (error) {}
if (File.IsFile(p)) {
try {
if (prjCfg.miscInfo && prjCfg.miscInfo.uid) {
const ctx = JSON.parse(fs.readFileSync(p, 'utf8'));
const key = `project.${prjCfg.miscInfo.uid}`;
const val = getGlobalState().get<string>(key);
const saveVal = JSON.stringify(ctx);
if (val !== saveVal)
getGlobalState().update(key, saveVal);
}
fs.unlinkSync(p);
} catch (error) {
const errMsg = `${(<Error>error).name} ${(<Error>error).message}`;
GlobalEvent.log_warn(`Fail to migrate user context '${p}'. msg: ${errMsg}`);
GlobalEvent.log_show();
}
}
}

export async function doMigration(projectRootDir: File) {
Expand Down
4 changes: 2 additions & 2 deletions src/ToolchainManager.ts
Original file line number Diff line number Diff line change
Expand Up @@ -180,8 +180,8 @@ export class ToolchainManager {

private readonly toolchainNames: ToolchainEnums = {
'C51': ['GNU_SDCC_MCS51', 'Keil_C51', 'SDCC', 'IAR_STM8', 'COSMIC_STM8'],
'ARM': ['AC5', 'AC6', 'GCC', 'LLVM_ARM', 'IAR_ARM', 'ANY_GCC'],
'RISC-V': ['RISCV_GCC', 'ANY_GCC'],
'ARM': ['AC5', 'AC6', 'GCC', 'LLVM_ARM', 'IAR_ARM'],
'RISC-V': ['RISCV_GCC'],
'MIPS': ['MTI_GCC'],
'ANY-GCC': ['ANY_GCC']
};
Expand Down