4 ms·
> The fix was simple. I manually replaced the word “compile” with the word “implementation”. I really wonder why are we letting this happen. Really A similar
by raverbashing 6y ago
> The fix was simple. I manually replaced the word “compile” with the word “implementation”.
I really wonder why are we letting this happen. Really
A similar thing to when I see a command or an API call that does what you want then says "deprecated" (with no clue of why or how to do that now). Sure, because nobody does this anymore right? (and I'm not talking about complicated stuff) Or the new function works in some mysterious way when the old one was straightforward
I mean, really
But it seems people are "moving fast, breaking things and who cares if it's broken? it works for me"
- brazzy 6y ago> A similar thing to when I see a command or an API call that does what you want then says "deprecated" (with no clue of why or how to do that now). Hm, that is actually a point where (in my experience at least) the Java community tends to do pretty well: in nearly all cases where I see an API that is deprecated there is a comment that at least tells you what you should use instead. Additionally, "deprecated" usually means that it still works, which is a whole lot better than having it simply disappear.
- jeroenhd 6y agoThe compile keyword produced warnings for over three years now. The author was likely developing with an old or bad guide in hand, because the warnings were there. In my experience, many of the Android methods marked as deprecated also contained docstrings to the new API and how to use it. In some cases it can even automatically insert the boilerplate code to do what the old, deprecated function did with the extra error handling for changes to the platform. compile and implementation aren't the same thing. Depending on your use case, compile needs to be either changed to api or implementation. They aren't the same thing, so just a quick replace by the IDE would likely break more than it fixes. The problem is that most guides treat them as the same thing and make people think the compiler is being stupid for changing the word they need. I can't speak for other projects, but for Android, where most of my deprecation struggles came from, the change was the result of changing requirements. Early Android was a wild west where every app could copy the contents of your SD card and upload it to their servers without even so much as a warning, where IMEI numbers were widely used as identifiers in databases for analytics and where permissions were more of theory than a practical requirement. Killing random apps was a permission any application could obtain, app databases appeared on your SD card which sometimes included credentials and secretly turning on cameras was easy to do by rendering the preview to a 1x1 pixel area. Screen hijacks were also commonly possible, causing major concern for apps for banking and such. Google had to retroactively restrict applications with new permission systems and applications often crashed without workarounds because the developers often never bothered with exception handling for stuff like file I/O. This isn't moving fast and breaking things, this is trying to fix fatal flaws in the design of a running train. When I encounter deprecation, it's because the underlying design of the API I use has significantly changed, often for good reason. It's annoying when features turn from a simple function call to a complicated code structure, but there's often a good reason behind it. I just wish people would put those reasons in their docstrings and release notes instead of marking stuff as deprecated and leaving it at that.
- xondono 6y agoThat’s not the point of the article, the point is that if a developer gets to the point of having to break things, it should think on how to mitigate the work is forcing upon those who use its tools. It’s about being conscious about others time and the impact your work has on theirs. They might be a good reason for changing “compile” to “implementation”, but it costs nearly nothing for the dev to add a specific rule that if “compile” is in the code, the compiler should show a link or point to the docs or explain how to solve it. On the other side it’s painfully costly for anyone using that tooling to understand what’s happening, why the change, how to solve it. The end result is that a lot of inexperienced users will find a fix that works for them (like bulk replace of one for the other), and the end result tends to be a worse ecosystem for all.
- jsnell 6y agoI don't think that's true. This is what the author wants. Or rather, demands: > Why doesn’t Android Studio / Gradle / Whatever just go “Mate – you’ve used compile here – that won’t work. Want me to automatically update the syntax? It’ll probably be fine.” But the machine can't make the decision, since it doesn't know the intent. The informed human in charge of the project does. What if there's automation, and tool ends up making the wrong decision? I bet that the author would be complaining about that instead. Reading the Twitter threads that the author links to are quite illuminating, and it's surprising to me he feels it's showing him in a good light. It's an amazing display of both entitlement and intentional ignorance.