You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Oct 1, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: BRANCHNOTES.md
+24-9
Original file line number
Diff line number
Diff line change
@@ -14,15 +14,28 @@ The generator takes the parser's output and transforms it into a valid `c_cpp_pr
14
14
Provide a configuration flag which allows the user to turn this feature off - this is useful for the cases in which this magic fails or the user has a very specific setup. Although this branch tries to eliminate most of the latter cases.
15
15
16
16
### Global Tasks in vscode-arduino
17
+
See table below.
18
+
19
+
### Branch Log
20
+
**2020 02 05** Currently I'm able to generate error free IntelliSense setups for AVR and ESP32 using the preliminary implementation. For ESP32 I just had to add the intrinsic compiler paths manually. A solution has to be found for these ... which there is, see [here](https://stackoverflow.com/a/6666338)
21
+
**2020 02 06** Got it fully working (with built-in include directories) for AVR, ESP32, ESP8266. Rewrote the backend to facilitate writing of further parser engines in the future.
22
+
**2020 02 07** Wrote compiler command parser npm package [cocopa](https://www.npmjs.com/package/cocopa) and began writing a test framework for it. Added a global configuration switch which allows the IntelliSense configuration generation to be turned off.
23
+
**2020 02 08** Integrated `cocopa` into vscode-arduino. Added project configuration flag which can override the global flag in both ways (forced off, forced on). Made code tslint compliant. Began some documentation in [README.md](README.md). vscode-arduino now tries to generate an IntelliSense configuration even if compilation (verify) should fail. vscode-arduino now tries to generate a IntelliSense configuration even if Arduino's verify failed (if the main sketch compilation was invoked before anything failed)
24
+
**2020 02 09** Moved vscode-arduino specific from cocopa over (to keep cocopa as generic as possible). More unit testing within cocopa. Some research regarding future serial monitor implementation. Implemented c_cpp_properties merging -> compiler analysis results are merged into existing configuration and will preserve configurations of different name than the vscode-studio default configuration name (currently "Arduino"). This opens up the possibility for users to write their own configurations without having to disable the autogeneration. Implemented "write on change" - `c_cpp_properties.json` will only be written if a new configuration has been detected. Now loads of tests have to be written for cocopa.
25
+
**2020 02 10-12** Worked primarily on cocopa and test cases, fixed some npm and build errors on vscode-arduino within my setup.
26
+
**2020 02 15** Merged `upload``uploadUsingProgrammer` and `verify` into a single function since they shared mostly the same code
27
+
* Better readability
28
+
* Better maintainability
29
+
* Less code redundancy -> less code -> less bugs
30
+
* Keeps the calls to the Arduino build CLI at a single location
31
+
32
+
During merging I found some bugs within those functions - mainly due to the above problem. The most notable were:
33
+
* The serial monitor state wasn't restored when something went wrong
34
+
* In one of the `upload` functions the original authors forgot to invoke the "pre build command"
35
+
* Error message formatting was fixed within `verify` only
36
+
* No consistent return values within `verify` (when it bailed out early it returned `void`)
17
37
18
38
### Status
19
-
**2020-02-05** Currently I'm able to generate error free IntelliSense setups for AVR and ESP32 using the preliminary implementation. For ESP32 I just had to add the intrinsic compiler paths manually. A solution has to be found for these ... which there is, see [here](https://stackoverflow.com/a/6666338)
20
-
**2020-02-06** Got it fully working (with built-in include directories) for AVR, ESP32, ESP8266. Rewrote the backend to facilitate writing of further parser engines in the future.
21
-
**2020-02-07** Wrote compiler command parser npm package [cocopa](https://www.npmjs.com/package/cocopa) and began writing a test framework for it. Added a global configuration switch which allows the IntelliSense configuration generation to be turned off.
22
-
**2020-02-08** Integrated `cocopa` into vscode-arduino. Added project configuration flag which can override the global flag in both ways (forced off, forced on). Made code tslint compliant. Began some documentation in [README.md](README.md). vscode-arduino now tries to generate an IntelliSense configuration even if compilation (verify) should fail. vscode-arduino now tries to generate a IntelliSense configuration even if Arduino's verify failed (if the main sketch compilation was invoked before anything failed)
23
-
**2020-02-09** Moved vscode-arduino specific from cocopa over (to keep cocopa as generic as possible). More unit testing within cocopa. Some research regarding future serial monitor implementation. Implemented c_cpp_properties merging -> compiler analysis results are merged into existing configuration and will preserve configurations of different name than the vscode-studio default configuration name (currently "Arduino"). This opens up the possibility for users to write their own configurations without having to disable the autogeneration. Implemented "write on change" - `c_cpp_properties.json` will only be written if a new configuration has been detected. Now loads of tests have to be written for cocopa.
24
-
25
-
26
39
|| Tasks |
27
40
|-----:|:--------|
28
41
|**Build output parser**|:heavy_check_mark: Basic parser working |
@@ -44,12 +57,13 @@ Provide a configuration flag which allows the user to turn this feature off - th
44
57
||:white_check_mark: All unit tests in cocopa |
45
58
||:white_check_mark: Test with cpp sketches |
46
59
|**General**|:white_check_mark: Review and remove previous attempts messing with `c_cpp_properties.json` or IntelliSense. (Partially done - documented in the [General Tasks](#General-Tasks) section |
47
-
||:white_check_mark: Auto-run verify after a) *setting a board* b) *changing the sketch* c) *workbench initialized and no `c_cpp_properties.json` has been found*. We have to generate a valid `c_cpp_properties.json` to keep IntelliSense working in such situations. Identify other occasions where this applies (usually when adding new libraries), hint the user to run *verify*? -> Good moment would be after the workbench initialization -> message in arduino channel |
60
+
||:white_check_mark: Auto-run verify after a) *setting a board* b) *changing the sketch* c) *workbench initialized and no `c_cpp_properties.json` has been found*. We have to generate a valid `c_cpp_properties.json` to keep IntelliSense working in such situations. Identify other occasions where this applies (usually when adding new libraries), hint the user to run *Arduino: Rebuild IntelliSense Configuration*? -> Good moment would be after the workbench initialization -> message in arduino channel |
48
61
||:heavy_check_mark: Document configuration settings in [README.md](README.md)|
49
62
||:white_check_mark: Document features in [README.md](README.md) (partially done) |
50
63
||:heavy_check_mark: Try to auto-generate even if verify (i.e. compilation) fails |
51
64
||:heavy_check_mark: Extract compiler command parser from vscode-arduino and [publish](https://itnext.io/step-by-step-building-and-publishing-an-npm-typescript-package-44fe7164964c) it as a separate package which will allow reusage and easy testing without heavy vscode-arduino rucksack. Done, see [cocopa](https://www.npmjs.com/package/cocopa)|
52
-
||:white_check_mark: Parser only works when arduino is set to `verbose`, since this is the only way we get the compiler invocation command. This has to be fixed. |
65
+
||:heavy_check_mark: Parser only works when arduino is set to `verbose`, since this is the only way we get the compiler invocation command - this has to be fixed (done, see next item) |
66
+
||:heavy_check_mark: Implement a *Rebuild IntelliSense Configuration* command which runs verify verbosely internally and therefore allows us to find and parse the compiler command |
53
67
||:white_check_mark: Finally: go through my code and look for TODOs |
54
68
55
69
`*` not committed to branch yet
@@ -84,6 +98,7 @@ I will list every supporter here, thanks!
84
98
2020-02-11 Elektronik Workshop: 16 :beers: (4h coding)
85
99
2020-02-12 Elektronik Workshop: 32 :beers: (8h coding)
86
100
2020-02-15 T.D.: 4 :beers: (20$ - Thanks a lot!)
101
+
2020-02-15 Elektronik Workshop: 28 :beers: (7h coding)
0 commit comments