If I may make a suggestion, code fiends

I am all for the proliferation of more advanced and efficient code.. But,

FOR THE LOVE OF GOD, ALLAH, MUHAMMAD, WHATEVER DIETY YOU PRAISE:

STOP MODIFYING LIBRARIES AND USING THE SAME CALLS TO IT!

If you want to create a new library, all good. Name it something unique.
If you want to optimize an existing library, all good. NAME IT SOMETHING UNIQUE.

I have spent the past 5 days going through a half dozen different programs I developed over a year ago, spanning over some 5000+ lines of code, and after going through an IDE update, I find that ALL of them do not compile any longer...

Serial UART? BROKEN.
PWM output control? BROKEN.
NVS Storage? BROKEN.

Again, I am all for the advancement of code efficiency but when you guys do things to already existing libraries that REQURE a change to syntax, YOU are not making life any easier....

Just my $0.02 here...

1 Like

I'm afraid that particular ship sailed long ago. Nowadays, breaking changes are, if not the norm, certainly more and more common. Having to relearn how to use things every 6 months or so isn't seen as an issue.

Ask anyone who updated their ESP32 core from v2 to v3 how much fun that was!

Learning new code isn't an issue at all, I totally agree. I believe that you missed my point in that, if you want to make a change, do it.... but DONT break my old code...

And you know, what I Am proposing isn't difficult whatsoever. If you want to modify a library, CALL IT SOMETHING DIFFERENT. ledcSetup? No problem! Call it:

ledcSetupv2

or WHATEVER. JUST..... DO..... NOT......USE......THE......SAME.....LIBRARY..... CALL.....NAME...

How hard is it really to see the simple solution here? You guys are freaking geniuses.. But you can't wrap your heads around basic organization? Come on man.... You guys are better than this..

1 Like

while on this topic: put a link to the library just behind the <include>. Too many libraries with overlapping names.

Wow. Y'know, I was on your side. Now, good-bye!

Wha?? You just folded like a wet napkin there bro...

We aren't enemies. We hardly even know each other. :wink:

For the sake of my OP, all I am getting at here is a suggestion to stop screwing around with old libraries and if you want to make a change to it, CALL IT SOMETHING DIFFERENT and DONT break my old code. :slight_smile:

We are all good, VDD. :wink:

@AshPowers I learned a long time ago that if I was using a library from somewhere else, I packaged that version of that library with my final product. What you're depending upon just is not reasonable, nor is it likely to ever be considered reasonable, so you'll have to change your practice.
It's no fun, but it's reality.

1 Like

This sounds like a rant about ESP32 v2 to v3 from the functions mentioned. However, there are many other examples: Nrf24L01, IR library, Json etc. which have given rise to some outbursts of frustration in the past.

The general solution is not to use such new major versions (board packages, libraries) unless you have checked and modified your code for compatibility and just stay with the old one.

The problem comes when, in the case of Arduino, the IDE makes the assumption that the user always wants the new version of everything, in fact it cannot handle multiple version levels of the same resource, and constantly nags until everything is at its latest version.

Posts are disappearing. I missed the good stuff.

When you have a "release" sketch, put all header files in tabs in the same project, and save it all together.

@AshPowers, I think that there have been requests to at least generate a list of the relevant information (board package version, library versions).

I know that it's too late now for you, but for your future projects you can do your final compile with *verbose output during compilation" enabled and save the output to a file. The info contains the version of the board package that was used as well as the versions of the libraries.

Note:
In my opinion using the IDE for any Espressif based boards is (or seems to be) a nightmare. The long path names cause plenty of havoc and the the compile process can fail without any indication about the why.

I put my release versions in a portable install of IDE 1.8.19; one per project. I sorely miss that option in IDE 2.x (yes, there are hacks around it).

2 Likes

Why? Optimizing a library shouldn't break any application that properly uses its external API. If an application relies on (i.e., assumes) specific behavior that isn't a guaranteed part of the library's external API and breaks after the library is optimized, the application itself is broken and should be fixed.

Apparently, nothing is guaranteed..... Not even, just using a DIFFERENT name call for an updated library?

Like, really, guys?

Make it better and prove yourself as a master of code.. Do whatever you need to do that makes you feel like you are worthy....

BUT! Do all of us other folks a favor..... Stop... breaking....... LEGACY..... code!

And on a personal note here, Chris..

I didn't misuse or misinterpret any aspect of the libraries I employed for my application. WHAT happened is that the people who have made changes to the libraries I already have written absolutely the most efficient code and leveraged their work (that I have paid for) such that I have built a product, for my business, for my tens of thousands of very, very, satisfied customers, AROUND THE WORLD...... these programmers... THEY changed sh*t and it is affecting my business.

and you are going to sit there, you little keyboard cowboy... and tell me that what I am simply suggesting as a solution is a problem that.... what? I created myself? GTFOH bruh...

@AshPowers please behave in a more civil manner. You are establishing a pattern of disproportionately rude and combative responses.

That is not appropriate behavior for our forum, and more importantly it is very counterproductive. You are making a request of a community of developers of open source software that is given freely to you, often done purely as a passion project in the developer's spare time. Do you really think it will be effective to use such a rude and aggressive tone in your requests? I can assure you that it will not. What this sort of attitude does do is burn out these developers and kill the open source projects upon which the Arduino community depends.

Combative? That's rich. Grow thicker skin, son..

In my era, the way we get things done is we do and we say whatever it necessary to get the job done. We don't care if it hurts your feelings. That doesn't get anything done.

And you want to come in here... with your social sensitivities? Listen, SON,... I'm not here to whine about the weather.. I'm here to offer a solution to a problem that is actually costing ME money. I dont know what your involvement within this platform is, and I absolutely do not care. That's your business.

So, before you get too bent out of shape with your QWERTY on me, I suggest you take a look back at my original post and understand WHERE I am coming from and that I did NOT come here to fight....

Seems to me you did come to fight.
Why be so dramatic?
A 'pro' who's dependent on open source libraries.

I have had this happen. I solved it by making a note at the top of my "final" sketches noting what version IDE and what library versions I was using.

Sometimes it's just easier to roll back to the old versions.

Can't you select what version of a library you use in the IDE?

1 Like

That's why I make a note at the top of my "final" sketches. Yes, yes you can. I have numerous sketches that use the IRemote 2.x library and hell if I'm going to go through hundreds of lines of code to make all the changes that the 4.x library needs for its improvements, improvements though they may well be.

3 Likes

A pro who doesn't take note of version changes with the libraries he uses then rants at anyone who responds to his post.

1 Like