I'm not sure if this is a problem with the V2.x IDE or my file naming conventions. I haven't used the Arduino in several years. But on other platforms I usually save programs with filenames like, "Motor Control V1.0". The next update will be, "Motor Control V1.1", etc.
Recently I started working on a program for a co-worker. The original code was saved as, "Arduino Blaster V1.0" and subsequent updates increase, for example, "Arduino Blaster V1.1". For some reason when I open a particular version, the IDE always seems to upload the latest version, as if it is ignoring the Vx.x part of the filename.
The sketch root folder name and code file names must start with a basic letter (A-Z or a-z) or number (0-9),
followed by basic letters, numbers, underscores (_), dots (.) and dashes (-). The maximum length is 63 characters.
Unfortunately, enforcement of using specification-compliant names has not yet been added to Arduino IDE 2.x, but there is no guarantee non-compliant names will work, and if they do work now there is no guarantee they will continue to work. So it is strongly recommended that you use specification-compliant names.
I was not able to reproduce the bug. Please provide detailed instructions I can follow to reproduce it.
Please tell me exactly how you are opening the "version".
When you say "filename", what exactly are you naming? Please provide a description of the exact filesystem structure you have produced. Keep in mind that an Arduino sketch is a folder, not a file.
Thank you for your reply. I just read the documentation at the link you provided. It does make sense. I just never had these constraints and didn't realize what was happening. Again, thank you. I will make the necessary changes to my projects. And in the future I will keep these rules in mind when creating new projects.
As I said, the behavior in the case of names that do not comply with the specification is undefined. That said, I would still be interested in investigating the bug you reported where the incorrect version is uploaded if you are willing to provide more information about it. It would probably not be considered a high priority for the developers if the bug was specific to non-compliant sketch names, since the higher priority should be to implement a system that restricts sketch names to compliance (as is already in place in Arduino IDE 1.x). However, such sketch names are still likely to occur in the wild and so it would be useful for me to understand any potential problems these sketches might present to the users.