Added sketch tabs don't follow concatenation order #987
Labels
topic: code
Related to content of the project itself
type: imperfection
Perceived defect in any part of project
Describe the problem
Arduino sketches may consist of multiple files, which are shown in the Arduino IDE as tabs when that sketch is open. All the
.ino
files of the sketch are concatenated before compiling, starting with the file that matches the sketch name, followed by the rest in lexicographical order:https://arduino.github.io/arduino-cli/dev/sketch-build-process/#pre-processing
The resulting program structure is conveyed to the user in an intuitive manner by the order of the
.ino
sketch tabs in the IDE reflecting their concatenation order.🐛 Tabs of newly added files follow the order of addition rather than the order of sketch concatenation. The concatenation behavior for these files will not be intuitive to a user unfamiliar with the obscure low level details of sketch pre-processing.
To reproduce
b.ino
a.ino
🐛 The "a.ino" tab is added to the right of the "b.ino" tab.
Expected behavior
The editor tabs of
.ino
sketch files match their concatenation order.Arduino IDE version
Original report
2.0.0-rc6-snapshot-289f9d7
Last verified with
51f69f6
Operating system
Windows
Operating system version
10
Additional context
The bug also occurs when files are added to the sketch externally
The bug also occurs when files are renamed.
Arduino IDE 1.x handles ordering of tabs for added sketch files as expected.
Additional reports
Issue checklist
The text was updated successfully, but these errors were encountered: