Skip to content

Conversation

@vaygr
Copy link
Contributor

@vaygr vaygr commented Dec 4, 2020

What type of PR is this? (check all applicable)

  • Refactor
  • Feature
  • Bug Fix
  • Optimization
  • Documentation Update
  • Other: compilation fix

Description

This fixes building polybar with clang++ 3.4.2.

Related Issues & Documents

An exemplar linking error, which we couldn't debug was this:

libpoly.a(alsa.cpp.o): In function `polybar::modules::module<polybar::modules::alsa_module>::type() const':
/root/.ccache/tmp/alsa.stdout.host.4433.8kXOHg.ii:(.text._ZNK7polybar7modules6moduleINS0_11alsa_moduleEE4typeEv[_ZNK7polybar7modules6moduleINS0_11alsa_moduleEE4typeEv]+0xa): undefined reference to `polybar::modules::alsa_module::TYPE'

repeated for every compiled module.

Documentation (check all applicable)

  • This PR requires changes to the Wiki documentation (describe the changes)
  • This PR requires changes to the documentation inside the git repo (please add them to the PR).
  • Does not require documentation changes

@codecov
Copy link

codecov bot commented Dec 5, 2020

Codecov Report

Merging #2270 (db0bb23) into master (62638a5) will increase coverage by 0.21%.
The diff coverage is 0.00%.

Impacted file tree graph

@@            Coverage Diff            @@
##           master   #2270      +/-   ##
=========================================
+ Coverage    7.31%   7.52%   +0.21%     
=========================================
  Files         155     156       +1     
  Lines       10634   10681      +47     
=========================================
+ Hits          778     804      +26     
- Misses       9856    9877      +21     
Flag Coverage Δ
unittests 7.52% <0.00%> (+0.21%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
include/modules/meta/base.inl 0.00% <0.00%> (ø)
src/modules/fs.cpp 0.00% <0.00%> (ø)
src/modules/cpu.cpp 0.00% <0.00%> (ø)
src/adapters/net.cpp 0.00% <0.00%> (ø)
src/modules/memory.cpp 0.00% <0.00%> (ø)
src/modules/battery.cpp 0.00% <0.00%> (ø)
src/modules/network.cpp 0.00% <0.00%> (ø)
src/modules/meta/base.cpp 0.00% <0.00%> (ø)
include/modules/battery.hpp 0.00% <0.00%> (ø)
src/modules/temperature.cpp 0.00% <0.00%> (ø)
... and 6 more

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 62638a5...db0bb23. Read the comment docs.

@patrick96 patrick96 changed the base branch from master to hotfix/3.5.1 December 5, 2020 00:04
@patrick96 patrick96 self-requested a review December 5, 2020 00:04
Copy link
Member

@patrick96 patrick96 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Great! I'm glad we could find a small fix for this issue.

Thanks for adding the patch :)

@patrick96 patrick96 merged commit 3d6a7ff into polybar:hotfix/3.5.1 Dec 5, 2020
@vaygr vaygr deleted the type-link-fix branch December 5, 2020 00:20
@vaygr vaygr mentioned this pull request Dec 7, 2020
9 tasks
patrick96 added a commit that referenced this pull request Dec 12, 2020
Changelog

**Features**

* config: Multiple inheritance (#2271), see #2269

**Fixes**

* (#2285), see #770, #2289
* Timer module: Polybar crash when interval is set to 0 (#2274), see #2273
* `custom/menu`: Wrong level numbers in error messages (#2264)
* `internal/xworkspaces`: Ignored certain workspace updates (#2275), see #2272
* Logger: Undefined behavior (#2284)
* build:
    * Build issues in older clang versions (#2270, #2279, #2280)
@patrick96 patrick96 mentioned this pull request Dec 12, 2020
12 tasks
patrick96 added a commit to patrick96/polybar that referenced this pull request Dec 13, 2020
The change in polybar#2270 accidentally broke how we access module types.
module<Impl>::TYPE always points to the module superclass and it thus
accesses its empty TYPE field.

This mainly broke legacy action handling.

Ref polybar#2270
patrick96 added a commit to patrick96/polybar that referenced this pull request Dec 13, 2020
The change in polybar#2270 accidentally broke how we access module types.
module<Impl>::TYPE always points to the module superclass and it thus
accesses its empty TYPE field.

This mainly broke legacy action handling.

Ref polybar#2270
patrick96 added a commit that referenced this pull request Dec 13, 2020
The change in #2270 accidentally broke how we access module types.
module<Impl>::TYPE always points to the module superclass and it thus
accesses its empty TYPE field.

This mainly broke legacy action handling.

Ref #2270
@patrick96 patrick96 mentioned this pull request Dec 14, 2020
11 tasks
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants