Skip to content

Conversation

MaxFangX
Copy link
Contributor

Problem

cargo build --release

error[E0425]: cannot find value `SCORER_PERSIST_TIMER` in this scope
   --> lightning-background-processor/src/lib.rs:360:55
    |
360 |                 if last_scorer_persist_call.elapsed().as_secs() > SCORER_PERSIST_TIMER {
    |                                                                   ^^^^^^^^^^^^^^^^^^^^ not found in this scope

warning: ignoring -C extra-filename flag due to -o flag

For more information about this error, try `rustc --explain E0425`.
warning: `lightning-background-processor` (lib) generated 1 warning
error: could not compile `lightning-background-processor` due to previous error; 1 warning emitted

Solution

Remove the debug_assertions compilation condition so that SCORER_PERSIST_TIMER will be compiled when building for release.

@codecov-commenter
Copy link

Codecov Report

Merging #1533 (e291fb6) into main (22dc964) will decrease coverage by 0.02%.
The diff coverage is n/a.

@@            Coverage Diff             @@
##             main    #1533      +/-   ##
==========================================
- Coverage   90.94%   90.91%   -0.03%     
==========================================
  Files          80       80              
  Lines       43469    43469              
  Branches    43469    43469              
==========================================
- Hits        39533    39521      -12     
- Misses       3936     3948      +12     
Impacted Files Coverage Δ
lightning-background-processor/src/lib.rs 95.20% <ø> (ø)
lightning/src/ln/functional_tests.rs 96.98% <0.00%> (-0.18%) ⬇️

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 22dc964...e291fb6. Read the comment docs.

@tnull tnull requested a review from arik-so June 10, 2022 06:54
Copy link
Contributor

@tnull tnull left a comment

Choose a reason for hiding this comment

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

Ah, good catch!

LGTM.

@TheBlueMatt
Copy link
Collaborator

Ouch. This needs CI so that this doesn't regress.

@tnull
Copy link
Contributor

tnull commented Jun 10, 2022

Ouch. This needs CI so that this doesn't regress.

Agreed, will open a PR that adds a job with cargo check --release.

@tnull tnull mentioned this pull request Jun 10, 2022
@TheBlueMatt TheBlueMatt merged commit 0fc2036 into lightningdevkit:main Jun 10, 2022
Copy link
Contributor

@arik-so arik-so left a comment

Choose a reason for hiding this comment

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

Post-merge ACK

@MaxFangX MaxFangX deleted the fix-release branch June 10, 2022 17:27
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.

5 participants