Unneeded dependency in SD.h

The file "SD.h" links to SdFatUtils, in line 21:
#include "utility/SdFatUtil.h"

This is - as far as I see - not required and only makes troubles if you want to avoid having the Serial declared for your project.
The line could simply be commented out.

(btw: The page Arduino - SD should have a link to this forum, but the link there is wrong / dead)


Can you provide some more details? Can't remember having had problems (but I don't use the library often enough to remember).

Issue reported on github: SD reference, forum link equals OOPS when following · Issue #833 · arduino/reference-en · GitHub

In development version I add serial writes for debugging purposes. As this code should not be active in the deployed version, it's deactivated usign define-blocks.
To find potentially unwanted code accessing the serial I currently use this code:

// #define DEBUG
#ifndef DEBUG
  // Avoid that debug code remains in release version
  #define Serial RaiseErrorIfForgotInCode

This doesn't work if the SD lib is in use.
But for me the most important thing: Why should the SD lib link to a library that is not used anyway?

Probably just redundant code due to an oversight, and clearly nothing to get concerned about.