It's a weird question. There's the implication that the two are mutually exclusive, and that odd implication that prevention of discomfort is compassion, and that truth is the complete opposite of compassion.
To me, the truth has no moral value, no intrinsic connotation. All morality of truth is held within the intention of the truth.
Let's say you have an overly needy friend. They are an obviously fearful person who took a chance to get to know you. Now that they have they don't continue to take chances to grow their friend circle, instead opting to latch onto you for the entirety of their social needs.
The first dilemma you face is whether you are going to give this person the truth or simply let them slip away by flaking off their friendship. Anyone who has been on the receiving end of a fading friendship can tell you that the latter option does not feel like compassion. Anyone who has been on the giving end of a fading friendship may tell you the opposite, choosing to convince themselves that the truth is too harsh and that this option is more caring.
This dynamic exists because of the second dilemma, the method of truth. If our scenario comes to a confrontation of truth, there are two main methods to this confrontation - compassion or cruelty. A compassionate confrontation has the offended talking to the offender is simple and gentle tones, presenting the reality of the situation and offering support for possible solutions. The cruel confrontation comes when the offended finally boils over, explodes, and bluntly lays out the shortcomings of the offender with no intention at aid or assistance.
In our example of a fading friendship, the receiver longs for the former, where the giver sees the inevitability of the latter.
The idea of truth being opposed to compassion is born from the idea that truth is the final option when all others are expended. Truth becomes compassion when the teller of truth commits to fully accepting the consequences of that truth.