Bug 2106717 - ClangFormat plugin is broken because patch for LLVM is missing
Summary: ClangFormat plugin is broken because patch for LLVM is missing
Keywords:
Status: CLOSED ERRATA
Alias: None
Product: Fedora
Classification: Fedora
Component: qt-creator
Version: 37
Hardware: Unspecified
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Sandro Mani
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2022-07-13 11:21 UTC by Marco Bubke
Modified: 2022-09-27 00:15 UTC (History)
16 users (show)

Fixed In Version: qt-creator-8.0.1-3.fc37
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Environment:
Last Closed: 2022-09-27 00:15:48 UTC
Type: Bug
Embargoed:


Attachments (Terms of Use)

Description Marco Bubke 2022-07-13 11:21:07 UTC
Description of problem:
ClangFormat plugin is missing a patch for LLVM.

You can read it in the build description of Qt Creator: https://github.com/qt-creator/qt-creator/blob/master/README.md#clang-format

Version-Release number of selected component (if applicable):


How reproducible:
Activate the ClangFormat plugin and restart Qt Creator. You get a warning.

Steps to Reproduce:
1.
2.
3.

Actual results:
The indention with the ClangFormat plugin has glitches.

Expected results:
Works like the binaries distributed by the Qt Project.

Additional info:

Comment 2 Marco Bubke 2022-07-13 15:00:14 UTC
Because with Qt Creator 8 there is no link dependency anymore on LLVM except libFormat and it is normally linked statically so you could link Qt Creator with an patched static version of libFormat.

Comment 3 Marco Bubke 2022-07-24 23:37:14 UTC
Any update on the bug? I would use the flatpak but QtCreator is still not supporting the integration of the host system.

Comment 4 Timm Bäder 2022-07-26 07:44:03 UTC
Tom, what do you say?

Comment 5 Tom Stellard 2022-07-26 08:46:04 UTC
This patch needs to go upstream first, before we can consider backporting it.

Comment 6 Marco Bubke 2022-07-26 09:16:47 UTC
(In reply to Tom Stellard from comment #5)
> This patch needs to go upstream first, before we can consider backporting it.

This patch will not go upstream. It provides a special case for Qt Creator. So what else do you propose?

Comment 7 Tom Stellard 2022-07-26 16:31:29 UTC
(In reply to Marco Bubke from comment #6)
> (In reply to Tom Stellard from comment #5)
> > This patch needs to go upstream first, before we can consider backporting it.
> 
> This patch will not go upstream. It provides a special case for Qt Creator.
> So what else do you propose?

Can we restart the discussion upstream and try to find a solution for this problem?

Comment 8 Marco Bubke 2022-07-26 16:49:03 UTC
(In reply to Marco Bubke from comment #6)
> (In reply to Tom Stellard from comment #5)
> > This patch needs to go upstream first, before we can consider backporting it.
> 
> This patch will not go upstream. It provides a special case for Qt Creator.
> So what else do you propose?

If you mean by upstream libFormat in LLVM there was already a discussion with the maintainer. I was not involved into it but AFAIK he does wanted that feature. It was not about if the feature was useful but indentation for an IDE was seen by him out of scope. But I was not involved into that topic directly.

Comment 9 Marco Bubke 2022-07-27 23:28:57 UTC
What about patch libFormat only for Qt Creator and link it statically?

Comment 10 Tom Stellard 2022-07-28 16:19:25 UTC
(In reply to Marco Bubke from comment #8)
> (In reply to Marco Bubke from comment #6)
> > (In reply to Tom Stellard from comment #5)
> > > This patch needs to go upstream first, before we can consider backporting it.
> > 
> > This patch will not go upstream. It provides a special case for Qt Creator.
> > So what else do you propose?
> 
> If you mean by upstream libFormat in LLVM there was already a discussion
> with the maintainer. I was not involved into it but AFAIK he does wanted
> that feature. It was not about if the feature was useful but indentation for
> an IDE was seen by him out of scope. But I was not involved into that topic
> directly.

I read through the review linked in the patch: https://reviews.llvm.org/D53072
and I didn't really see any strong objections.  But also the patch in that
review is different than the one that is actually being used.  I would recommend
resubmitting the patch and starting the discussion again.  Please add me as a
subscriber if you decide to do this.

> What about patch libFormat only for Qt Creator and link it statically?

How would we do this?

Comment 11 Sandro Mani 2022-07-28 22:05:00 UTC
>> What about patch libFormat only for Qt Creator and link it statically?

> How would we do this?

Giving it a quick look, one could bundle clang with qt-creator, just build libformat as a static library, and then link against that one when building the clangformat plugin. Not particularly excitied to bundle clang though, having it upstream would definitely be better.

Comment 12 Ben Cotton 2022-08-09 13:22:04 UTC
This bug appears to have been reported against 'rawhide' during the Fedora Linux 37 development cycle.
Changing version to 37.

Comment 13 Sandro Mani 2022-09-22 19:28:04 UTC
I've bundled a patched libClangFormat.

Comment 14 Fedora Update System 2022-09-22 19:28:35 UTC
FEDORA-2022-b42fa09266 has been submitted as an update to Fedora 37. https://bodhi.fedoraproject.org/updates/FEDORA-2022-b42fa09266

Comment 15 Fedora Update System 2022-09-23 01:49:28 UTC
FEDORA-2022-b42fa09266 has been pushed to the Fedora 37 testing repository.
Soon you'll be able to install the update with the following command:
`sudo dnf upgrade --enablerepo=updates-testing --refresh --advisory=FEDORA-2022-b42fa09266`
You can provide feedback for this update here: https://bodhi.fedoraproject.org/updates/FEDORA-2022-b42fa09266

See also https://fedoraproject.org/wiki/QA:Updates_Testing for more information on how to test updates.

Comment 16 Fedora Update System 2022-09-27 00:15:48 UTC
FEDORA-2022-b42fa09266 has been pushed to the Fedora 37 stable repository.
If problem still persists, please make note of it in this bug report.


Note You need to log in before you can comment on or make changes to this bug.