mirror of
https://github.com/arduino/arduino-ide.git
synced 2025-11-23 17:16:10 +00:00
feat: handle when starting debug session failed (#1809)
If the sketch has not been verified, IDE2 offers the user a verify action. Closes #808 Signed-off-by: Akos Kitta <a.kitta@arduino.cc>
This commit is contained in:
@@ -105,6 +105,17 @@ export interface SketchesService {
|
||||
* Recursively deletes the sketch folder with all its content.
|
||||
*/
|
||||
deleteSketch(sketch: Sketch): Promise<void>;
|
||||
|
||||
/**
|
||||
* This is the JS/TS re-implementation of [`GenBuildPath`](https://github.com/arduino/arduino-cli/blob/c0d4e4407d80aabad81142693513b3306759cfa6/arduino/sketch/sketch.go#L296-L306) of the CLI.
|
||||
* Pass in a sketch and get the build temporary folder filesystem path calculated from the main sketch file location. Can be multiple ones. This method does not check the existence of the sketch.
|
||||
*
|
||||
* The case sensitivity of the drive letter on Windows matters when the CLI calculates the MD5 hash of the temporary build folder.
|
||||
* IDE2 does not know and does not want to rely on how the CLI treats the paths: with lowercase or uppercase drive letters.
|
||||
* Hence, IDE2 has to provide multiple build paths on Windows. This hack will be obsolete when the CLI can provide error codes:
|
||||
* https://github.com/arduino/arduino-cli/issues/1762.
|
||||
*/
|
||||
tempBuildPath(sketch: Sketch): Promise<string[]>;
|
||||
}
|
||||
|
||||
export interface SketchRef {
|
||||
|
||||
@@ -13,6 +13,10 @@ export function firstToUpperCase(what: string): string {
|
||||
return what.charAt(0).toUpperCase() + what.slice(1);
|
||||
}
|
||||
|
||||
export function isNullOrUndefined(what: any): what is undefined | null {
|
||||
export function startsWithUpperCase(what: string): boolean {
|
||||
return !!what && what.charAt(0) === firstToUpperCase(what.charAt(0));
|
||||
}
|
||||
|
||||
export function isNullOrUndefined(what: unknown): what is undefined | null {
|
||||
return what === undefined || what === null;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user