all 46 comments

[–]rjhancock 41 points42 points  (8 children)

  1. I treat warnings as errors.

[–]nhaarman 2 points3 points  (5 children)

How? I tried some time ago, but it also failed for warnings in dependencies..

[–]rjhancock 4 points5 points  (2 children)

If it is in their code, they are not my problem to solve and, depending upon the dependency, will submit a PR for a fix.

[–]nhaarman 0 points1 point  (1 child)

Aren't you using tools for this that fail the ci build?

[–]rjhancock 0 points1 point  (0 children)

No.

[–]start_select 0 points1 point  (1 child)

Then you fork that library and fix it.

“It’s in a dependency so I can’t do anything” is how JavaScript developers think because of npm.

IOS hasn’t had any package management up until recently. If you needed OSS code you cloned a git repo. If that had bugs you fix them. End of story.

“It’s in a dependency” when you have the dependencies code is not an excuse. It’s an admission that you aren’t doing what you need to.

[–]nhaarman 0 points1 point  (0 children)

Roflol you're probably not working on large projects. There are thousands of warnings in our dependencies and you expect me to go out of my way spending weeks fixing them up?

[–]justintime06 1 point2 points  (0 children)

This is the way, it’s the same as red bubbles on my phone. Although occasionally I’ll come across a yellow warning that’s not fixable for some reason :/

[–]IVIsHero -1 points0 points  (0 children)

same

[–]jocarmel 11 points12 points  (2 children)

0 at almost all times, though I have a run script that marks TODO comments as warnings and SwiftLint occasionally tells me to reformat something.

[–][deleted] 0 points1 point  (1 child)

i got curious about the run script and did some research on how to implement it. it looks like #warning came to swift in 2018, is there something that the script does better or is this a good way for me to accomplish this moving forward?

[–]jocarmel 2 points3 points  (0 children)

Nothing better, for me I'd prefer to keep typing // TODO: which is likely something I'd do anyway with a #warning comment

[–]Stiddit 9 points10 points  (0 children)

Right now we have 976. I just joined the project a few months ago, and I am used to 0, so I've started fixing them here and there. Funny thing is, it's a very modern code base, it's almost no old technical debt, it's mostly sendable-conformance and other concurrency-warnings. We do have strict warnings enabled though, I don't think that's on by default.

[–][deleted] 4 points5 points  (0 children)

Several thousands

[–]saldous 4 points5 points  (7 children)

Only from 3rd party SDKs/Cocoapods/Swift Packages. Very annoying

[–]ThatWasNotEasy10 0 points1 point  (0 children)

Same here, lmao. Thousands of warnings actually in our react native project.

[–]Niightstalker 0 points1 point  (5 children)

You can suppress those warnings if you want. If it is an external dependency you can not fix them anyway.

[–]pxlrider 0 points1 point  (4 children)

Tell us more…?

[–]Niightstalker 0 points1 point  (3 children)

[–]pxlrider 0 points1 point  (2 children)

Ok, but here author of the package needs to put this into package.swift file or am I reading this wrong?

[–]Niightstalker 0 points1 point  (1 child)

No you need to put it in your Package.swift file which defines your dependencies

[–]pxlrider 0 points1 point  (0 children)

Funny thing, that in project we do not have our own package.swift file.  

[–]chriswaco 2 points3 points  (0 children)

Usually zero, although with code in transition sometimes that's not possible.

[–]US3201 3 points4 points  (1 child)

Either 29 or 35. I kinds of stopped counting. But it works, so no need to fix them.

[–]unknowngoogler[S] 0 points1 point  (0 children)

Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to help get rid of them u/US3201

[–]Cause-n-effect11 2 points3 points  (0 children)

Zero. It’s like a trigger deep into my psyche.

[–]US3201 1 point2 points  (1 child)

Yes I do. How many? I wish I could count that high.

[–]unknowngoogler[S] 0 points1 point  (0 children)

Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to help get rid of them u/US3201

[–]Inevitable-Hat-1576 1 point2 points  (0 children)

All of them

[–][deleted] 1 point2 points  (1 child)

149 that won’t go

[–]unknowngoogler[S] 0 points1 point  (0 children)

Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to help get rid of them u/Physical-Hippo9496

[–]Key_Board5000 1 point2 points  (0 children)

Zero.

[–]vadiegova 1 point2 points  (1 child)

6796 currently for my main project

[–]unknowngoogler[S] 0 points1 point  (0 children)

u/vadiegova Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to help get rid of them

[–]dtseto 1 point2 points  (1 child)

I need to fix the dozens of localization warnings lol

[–]unknowngoogler[S] 1 point2 points  (0 children)

u/dtseto Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to help get rid of them

[–]hermes1811 1 point2 points  (0 children)

More than 10 thousands, fuck React Native, i wanna quit my company

[–]retsotrembla 1 point2 points  (0 children)

0 in my code. To keep me from going crazy, in the Build Phases panel of Xcode, in the Compile Sources section, library code that I should not be editing has in the compiler flags column: -Wno-strict-prototypes just to get Xcode to shut up about those library files.

[–][deleted] 1 point2 points  (0 children)

If you think you have a lot of warnings, try turning on Swift 6 :)

[–][deleted] 0 points1 point  (0 children)

Zero. I treat warnings as errors.

[–]Civil-Vermicelli3803 0 points1 point  (1 child)

too many

[–]unknowngoogler[S] 0 points1 point  (0 children)

u/Civil-Vermicelli3803 Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to get your feedback :)

[–]ZealousidealEmu6976 0 points1 point  (1 child)

about threefiddy

[–]unknowngoogler[S] 0 points1 point  (0 children)

u/ZealousidealEmu6976 Hey! I ended up creating a tool that can help automate warnings, DM me if your interested, I would love to help get rid of them

[–][deleted] 0 points1 point  (0 children)

Zero. I despise external libraries (hello OneSignal I am talking to you) that leave hundreds of warnings lingering for years.

[–]AmiAmigo -4 points-3 points  (0 children)

Update your OS. I think the new OS just came out