Don't unconditionally enable the keyboard geometry parser
Needs RevisionPublic

Authored by bshah on Jan 26 2018, 4:16 PM.

Details

Reviewers
sitter
Group Reviewers
Plasma
Summary

Don't turn on keyboard geometry parser if Boost is found, developer may
have disabled building this code.

This code makes C++ compiler OOM even with 16GB of RAM, In my opinion
this is simply not acceptable, there are multiple build jobs failed on
both KDE CI and KDE Neon CI.

If someone wants to make this on by default, it needs to be optimized so
that it doesn't bring down full-fledged CI server nodes..

Note for release: Keyboard geometry parser is not enabled by default,
distribution may pass -DNEW_GEOMETRY option to re-enable this.

BUG: 362946

Test Plan

builds

Diff Detail

Repository
R119 Plasma Desktop
Branch
bshah/disable-geometry
Lint
No Linters Available
Unit
No Unit Test Coverage
bshah created this revision.Jan 26 2018, 4:16 PM
Restricted Application added a project: Plasma. · View Herald TranscriptJan 26 2018, 4:16 PM
Restricted Application added a subscriber: plasma-devel. · View Herald Transcript
bshah requested review of this revision.Jan 26 2018, 4:16 PM
bshah updated this revision to Diff 26004.Jan 26 2018, 4:22 PM

add bug in message

I can't find anything related to preview on my Arch Linux default Arch

kcm -> layouts -> add layout -> preview

I believe that port away from boost will fix the problem

I never had noticed any problems when compiling the code. Could it be that the CI system changed (e.g. newer compiler?) I would find it sad to lose this very useful feature (which might in fact not be exposed enough)

I never had noticed any problems when compiling the code. Could it be that the CI system changed (e.g. newer compiler?) I would find it sad to lose this very useful feature (which might in fact not be exposed enough)

This has been issue from forever.. see BUG: 362946

And for @hein and @broulik e.g this problem is so severe that it causes them to not able to compile plasma-desktop at all.

hein added a comment.EditedJan 27 2018, 10:52 AM

This locks up my PC several times a week. I lose work regularly because of it, and often can't finish compiling plasma-desktop successfully. I'm very +1 for killing it.

sitter added a subscriber: sitter.Jan 27 2018, 12:00 PM

I believe that port away from boost will fix the problem

IIRC the problem isn't with boost at large, it's that the code uses insanely deep recursive templates.

hein added a comment.Jan 27 2018, 12:01 PM

I believe that port away from boost will fix the problem

IIRC the problem isn't with boost at large, it's that the code uses insanely deep recursive templates.

Yeah:

# # the default maximum template expansion depth (256) is not enough
# set_property(SOURCE preview/geometry_parser.cpp APPEND_STRING PROPERTY COMPILE_FLAGS " -ftemplate-depth=512")

it is not clear if this code is functional at this moment or not

I'm -1 for disabling if the change is based on a false premise that it doesn't work.

Is it something you've already lost several hours into trying to fix? If so this proposal has a lot more merit.

If it is to be disabled, commenting something out when it's already in an if() block is not a good approach.
Also any hacks always always need a code comment.


FWIW: ktouch has it's own layout parser / preview code. It does update between UK and french and move the preview with the letters about, but switching to arabic returns an error, whereas the kcm preview works fine. Probably would need layer support too.

it is not clear if this code is functional at this moment or not

I'm -1 for disabling if the change is based on a false premise that it doesn't work.

No, this change is not proposed because I was not sure if is functional or not, but due to reason that it breaks my development workflow and probably for others as well..

bshah planned changes to this revision.Jan 27 2018, 12:08 PM

That said I've better idea..

bshah updated this revision to Diff 26050.Jan 27 2018, 12:17 PM
bshah retitled this revision from Disable keyboard geometry preview code to Don't unconditionally enable the keyboard geometry parser.
bshah edited the summary of this revision. (Show Details)
bshah removed subscribers: sitter, ngraham, hein and 4 others.

take another approch, fix code to not force-enable the keyboard geometry parser

Urgh, not sure why phab decided to kick all subscribers, sorry...

sitter requested changes to this revision.Jan 27 2018, 12:38 PM
This revision now requires changes to proceed.Jan 27 2018, 12:38 PM
bshah added a comment.Jan 27 2018, 1:03 PM

Line 5 does it already.

sitter resigned from this revision.Jan 27 2018, 1:06 PM

So it does. Nevermind the noise. using feature_info instead of message might still be a worthwhile change though. message() cannot be automatically parsed, feature_info can.

Where are we with this? The issue is really, really annoying and I imagine hits a lot of people trying to submit patches to plasma-desktop.

That said, I agree with @davidedmundson that we should actually fix the issue too. +1 on this for now though.

Here's an alternative approach that fixes the issue for me without needing to disable the feature: D17930