Skip to content

Error when replacing a .ino file with a new one in a directory ("How very Borges of you" error) #10879

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
boltalex389 opened this issue Oct 21, 2020 · 8 comments
Labels
Component: IDE user interface The Arduino IDE's user interface Type: Bug

Comments

@boltalex389
Copy link

On Windows (10 Pro), I got the "How very Borges of you" (the infinite folder error) when I was trying to replace a file in the directory.

@boltalex389 boltalex389 changed the title Error when replacing a .ino file with a new one in a directory (How very Borges of you) Error when replacing a .ino file with a new one in a directory (How very Borges of you error) Oct 21, 2020
@boltalex389 boltalex389 changed the title Error when replacing a .ino file with a new one in a directory (How very Borges of you error) Error when replacing a .ino file with a new one in a directory ("How very Borges of you" error) Oct 21, 2020
@per1234
Copy link
Collaborator

per1234 commented Oct 21, 2020

  1. Create a sketch
  2. Save the sketch
  3. File > Save as
  4. Open the sketch folder
  5. Click the "Save" button.

You now get the error:

"How very Borges of you"
You cannot save the sketch into a folder inside itself. This would go on forever.

  1. File > Save as
  2. Open the sketch folder
  3. Select one of the files of the sketch
  4. Click the "Save" button.

The save now completes successfully.

This is confusing behavior because if the sketch has multiple files, all the files are saved, not just the file you clicked on. The sketch is the entire folder, not only the .ino file, but the IDE's "Save as" and "Open" behavior reinforces the incorrect impression that the .ino file is the sketch.

@per1234 per1234 added Component: IDE user interface The Arduino IDE's user interface Type: Bug labels Oct 21, 2020
@ubidefeo
Copy link

the IDE's "Save as" and "Open" behavior reinforces the incorrect impression that the .ino file is the sketch.
@per1234 , I'd like to address this starting with the ne IDE, but it requires some thinking and testing which should be carried on asap

@dsyleixa
Copy link

"Sketch" is misleading for save/save as...
Wishful would be:
File save/save as (i.e., the current active (e.g., .ino) file in the IDE)
Project save/save as (i.e., the entire project "Sketch" folder)

@per1234
Copy link
Collaborator

per1234 commented Oct 25, 2020

Considering this IDE is specifically designed to have a simple UI to provide a friendly environment to beginners, I can't see any benefit to providing the ability to save a single file. It's very important to carefully consider every single element added to the UI to determine whether it's really needed. This is what sets the Arduino IDE apart from all the other IDEs

The sketch is a unit. When I save, I want to save the entire sketch, just as the Arduino IDE has always done.

@dsyleixa
Copy link

I have to disagree.
If I want to save, I want to save either a single file - or - the entire folder with all subfolders and all additional files (e.g., data subdirectory and/or extra .h files)

@NameOfTheDragon
Copy link

I have to disagree.
If I want to save, I want to save either a single file - or - the entire folder with all subfolders and all additional files (e.g., data subdirectory and/or extra .h files)

"There's more than one way to skin a cat". Arduino is a somewhat "opinionated framework". I think you have to accept that it is going to force users to work in a particular way that not everyone is going to like. It is what it is, and a lot of non-expert users seem to appreciate "the Arduino way". The moment you have multiple files in your sketch, you have probably already outgrown the Arduino IDE. Given how it works, the error message seems reasonable given what you were trying to do and in context, I don't see it as a problem. I personally don't use the Arduino IDE for exactly that reason - It seems very limiting to me and I don't like the editor or anything about it really. I like to work my own way and I don't really like opinionated frameworks. So I don't use it. You have other options, such as Visual Studio with the VisualMicro extension, or VS-Code with the Arduino extension or using PlatformIO. But given the modus operandi of the Arduino IDE, that error message seems entirely appropriate.

@dsyleixa
Copy link

it's not forbidden to make things better and more flexible, so please put it on the wishlist.

@boltalex389
Copy link
Author

Ok

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Component: IDE user interface The Arduino IDE's user interface Type: Bug
Projects
None yet
Development

No branches or pull requests

5 participants