Giter Club home page Giter Club logo

Comments (27)

ffissore avatar ffissore commented on May 28, 2024 215

Thank for you suggestion. However, I'm closing this as wontfix. Many apps store their conf in folders other from .config. We won't change an old feature such as using ~/.arduino15, even if not compliant with freedesktop standards

from arduino-ide.

goodmind avatar goodmind commented on May 28, 2024 40

But also many apps use ~/.config

from arduino-ide.

lhanson avatar lhanson commented on May 28, 2024 35

In $CURRENT_CENTURY there is very little justification for "nah, I dunno what this XDG business is but other random programs don't follow it so we won't either". The fact that ~/.arduino15 contains more than strictly configuration data makes it all the more troublesome. Given the number of thumbs-down votes on @ffissore 's closing the issue with no argument as to why users' preferences shouldn't be respected when there is zero technical downside to doing so, I get the impression I'm not the only one who feels this way.

Would the maintainers reconsider this position? I'd be happy to enter into a discussion if there is any uncertainty about the benefits this would provide to users and also possibly willing to contribute a patch as well.

@matthijskooijman :

I guess migrating to ~/.config might be useful at some point (perhaps also putting toolchains etc. in ~/.local/lib or so), but it's tricky to get the upgrade path right I'm afraid.

It really isn't. Countless applications have done so with seamless backwards compatibility for users expecting their files to be in the previous location. No user intervention, disruption, or even awareness is required, which is a distinct benefit written into XDG spec itself.

from arduino-ide.

matthijskooijman avatar matthijskooijman commented on May 28, 2024 31

@cmaglie, @facchinm, I think it might be good to reconsider this issue, maybe at least reopen it to indicate it should be done at some point. Since this update can be done fairly gracefully, it could just be implemented, or we could consider waiting for 1.9 or even 2.0 (alternatively, we could implement this now, and then in 2.0 do an active migration moving files out of ~/.arduino15).

Looks like there is a patch already (haven't looked at the patch yet). The upgrade path seems to be to use the old directory if it exists, or start using the new standards-compliant paths otherwise.

One migration issue that should also be fixed is that of documentation. The are probably docs that point to ~/.arduino15, which need to be updated. Of course a lot of these are on webpages outside of our control, but I guess they need to update themselves once this is released.

Maybe this is also a good moment to drop the "15" suffix from the config dir (e.g. use ~/.config/arduino)? And probably also fix the related arduino/arduino-cli#2115.

from arduino-ide.

Avamander avatar Avamander commented on May 28, 2024 31

This decision should be revisited because it was made five years ago and now is even more outdated than it was back then.

from arduino-ide.

tworthington avatar tworthington commented on May 28, 2024 30

Who died and put the jerks at freedesktop in charge anyway? The change is not needed.

from arduino-ide.

A6GibKm avatar A6GibKm commented on May 28, 2024 25

You can always set ~/.arduino15 as a fallback. No need to deprecate it.

from arduino-ide.

Perlovka avatar Perlovka commented on May 28, 2024 23

Hi, folks!

Since my issue (arduino/Arduino#7651) been locked for comments, I would like to share new patch here.

This patch will split default arduino files location to three categories:

  • Config dir - ~/.config/arduino
  • Cache dir - all temporary junk will go to ~/.cache/arduino
  • Data dir - all installed platforms, libraries etc. will be stored in ~/.local/share/arduino

Note: libraries path changed from Sketch directory to Data dir.

Two stub functions been added to arduino-core/src/processing/app/Platform.java (in addition to existing getSettingsFolder() ):

  public File getDataFolder() throws Exception {
    return getSettingsFolder();
  }

  public File getCacheFolder() throws Exception {
    return getSettingsFolder();
  }

And for Linux system they are overrided in arduino-core/src/processing/app/linux/Platform.java to return proper locations.
All related functions have been changed to use these three functions.

Note: If there is already ~/.arduino15 directory, no changes will be made, it is needed to move this dir elsewhere to use new locations.

Aplying patch should be safe for Win and Mac users, but this is not tested. To achieve same behaviour as for Linux system, three above functions should be overriden in proper Platform.java file.

The patch: https://github.com/Perlovka/portage-overlay/blob/master/dev-embedded/arduino/files/arduino-1.8.19-xdg-compliance.patch

arduino-cli could be patched as well to use same directories, patch could be found here: arduino/arduino-cli#1538 or in my repo on github.

from arduino-ide.

Abdillah avatar Abdillah commented on May 28, 2024 22

@matthijskooijman Is it that hard?

from arduino-ide.

 avatar commented on May 28, 2024 21

I think this should be revisited, as now the XDG Base Directory Spec is widely adopted and Arduino should support it, too.

Edit: In fact, it is the only application I use that refuses to follow the spec.

from arduino-ide.

Kreijstal avatar Kreijstal commented on May 28, 2024 18

Waiting for dev team to reconsider.

from arduino-ide.

Batwam avatar Batwam commented on May 28, 2024 17

I would really like to see this initial mistake to save the config in the wrong folder being reconsidered by the developers. Could the developers confirm that they still stand by the original decision to ignore the suggestion since it was made 7yrs ago and we are not even sure the people involved are still around?

It should be easy to implement ( if there is a ~/.arduino15, propose to transfer to . config/.), clearly matters to users and Arduino IDE is one of the few applications left ignoring this standard.

from arduino-ide.

lhanson avatar lhanson commented on May 28, 2024 15

@per1234 says in arduino/Arduino#10486:

If anyone has unique and productive information to add, they should do so in that issue and the developers can make the decision as to whether it is worth reopening. Fragmenting the discussion across multiple duplicate issue reports is unproductive.

I would argue that the discussion here already contains a fairly complete case for fixing this. There's really nothing more to add other than watching more and more people clicking 👍 on the issue because they're frustrated and clicking 👎 on the flippant comment which justified its closure in the first place.

There really isn't any argument against fixing this, it's clearly the right thing to do. At this point I'd say many of us feel that the onus is now on the maintainers to explain why this doesn't even seem to merit reopening.

from arduino-ide.

kalj avatar kalj commented on May 28, 2024 15

It is really sad to see this being ignored by the Arduino team like this. Even when you are getting a patch suggestions and over and over again being explained why this is important.

Saying that you don't have the time / have more important things to do is 100% fine.

Saying that this is not valid is just ignorant.

from arduino-ide.

lhanson avatar lhanson commented on May 28, 2024 14

And, look, @Perlovka has written a patch! arduino/Arduino#7651 (comment)

from arduino-ide.

Avamander avatar Avamander commented on May 28, 2024 14

@tworthington This change is very needed for Linux on the Desktop to be a nice option, rather than just a tolerable one. I'd suggest you'd appeal to something more constructive than jokes about someone dying.

Not following XDG-BD standard breaks declarative distributions, sandboxing and containerization, backups, roaming home folders, intelligent trash/cache cleanups and by contributing to the mess of nondescript dotfolders in $HOME it also worsens system administration in general.

So please, do elaborate how this is "not needed" without saying something egotistical like "I don't have a need for those use-cases."

from arduino-ide.

eliaskanelis avatar eliaskanelis commented on May 28, 2024 13

Thank for you suggestion. However, I'm closing this as wontfix. Many apps store their conf in folders other from .config. We won't change an old feature such as using ~/.arduino15, even if not compliant with freedesktop standards

You can always leave the old path as backward compatible. It is really not that hard to satisfy XDG standards while keeping backwards compatibility.

from arduino-ide.

rhysday avatar rhysday commented on May 28, 2024 5

For every program I use that doesn't follow XDG standard I use a wrapper. So I create XDG_FAKEHOME_DIR that directs to $HOME/.local/data. Then I create a folder there specific to the application. So my wrapper would look like this:
HOME=${XDG_FAKEHOME_DIR}/arduino
exec /usr/bin/arduino "$@"

But this is NOT working with Arduino! It's still creating folders in my HOME, I do not want 3 folders (arduio15, .java and Arduino) cluttering up my system.

Please fix. Or if someone knows what I need to put in my wrapper.

from arduino-ide.

A6GibKm avatar A6GibKm commented on May 28, 2024 2

For flatpak users it is possible to do

$ flatpak override --nofilesystem=home cc.arduino.arduinoide
$ flatpak override --persist=Arduino cc.arduino.arduinoide # Where you store your files
$ flatpak override --persist=.arduino15 cc.arduino.arduinoide

To get rid of HOME pollution.

from arduino-ide.

ffissore avatar ffissore commented on May 28, 2024

Can you briefly clarify what we are not doing and how we should do it?

from arduino-ide.

goodmind avatar goodmind commented on May 28, 2024

Hello,

Place user config directory of Arduino IDE (~/.arduino15) in folder that defined by $XDG_CONFIG_HOME or ~/.config (~/.config/arduino15)

from arduino-ide.

matthijskooijman avatar matthijskooijman commented on May 28, 2024

I guess migrating to ~/.config might be useful at some point (perhaps also putting toolchains etc. in ~/.local/lib or so), but it's tricky to get the upgrade path right I'm afraid.

from arduino-ide.

facchinm avatar facchinm commented on May 28, 2024

@mastrolinux @cmaglie can we discuss a bit @matthijskooijman 's proposal ?

from arduino-ide.

Thovthe avatar Thovthe commented on May 28, 2024

Doing this makes sense. I would say lets use @Perlovka's patch but I'm not sure about leaving the file as arduino15, though, I must admit not knowing the exact reason it was called that in the first place.

from arduino-ide.

TheEvilSkeleton avatar TheEvilSkeleton commented on May 28, 2024

For flatpak users it is possible to do

$ flatpak override --nofilesystem=home cc.arduino.arduinoide
$ flatpak override --persist=Arduino cc.arduino.arduinoide # Where you store your files
$ flatpak override --persist=.arduino15 cc.arduino.arduinoide

To get rid of HOME pollution.

@A6GibKm I appreciate and thank you so much for this. I really appreciate people like you and awesome software like Flatpak for fixing developers' lazy work.

Although keep in mind that this will make the IDE completely restricted, so you will have to import and save files inside $FLATPAK_APP_ID, which will be really annoying. I'd advise also running:

flatpak override --filesystem=xdg-desktop --filesystem=xdg-documents --filesystem=xdg-downloads --filesystem=xdg-pictures cc.arduino.arduinoide

to allow saving and importing to/from ~/Desktop, ~/Documents, ~/Downloads and ~/Pictures. (Maybe --filesystem=xdg-pictures might be completely useless.)

EDIT: I noticed that you are the maintainer of the Arduino Flatpak. It would be awesome if you can remove --filesystem=home and allow the directories mentioned above. Most people would be using ~/Documents to store their Arduino files anyway (right?).

I don't mind submitting an MR. It's just so annoying to have two files (one is acceptable, but two!? WHY?) lurking in your $HOME.

from arduino-ide.

ignamartinoli avatar ignamartinoli commented on May 28, 2024

+1

from arduino-ide.

varaskkar avatar varaskkar commented on May 28, 2024

Please 🙏

from arduino-ide.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.