• Home
  • Features
  • Pricing
  • Docs
  • Announcements
  • Sign In

Camelcade / Perl5-IDEA / #525521795

17 Mar 2026 06:05PM UTC coverage: 75.963% (+0.05%) from 75.914%
#525521795

push

github

hurricup
IJPL-237202 Refactored PerlNamesCache to improve reliability

- updating method is now asynchronous with a callback. Tests using semaphore
- NBRA now has a `coalesceBy` project, no manual control over duplications. We did have cases, when several actions run from different sources: queue and forceUpdate
- service stopping in tests is now implemented using test disposable, instead of manual code and atomic getter

14772 of 22636 branches covered (65.26%)

Branch coverage included in aggregate %.

18 of 23 new or added lines in 4 files covered. (78.26%)

7 existing lines in 4 files now uncovered.

31089 of 37737 relevant lines covered (82.38%)

0.82 hits per line

Source File
Press 'n' to go to next uncovered line, 'b' for previous

50.0
/plugin/common/src/main/java/com/perl5/lang/perl/idea/project/PerlNamesCache.kt
1
/*
2
 * Copyright 2015-2026 Alexandr Evstigneev
3
 *
4
 * Licensed under the Apache License, Version 2.0 (the "License");
5
 * you may not use this file except in compliance with the License.
6
 * You may obtain a copy of the License at
7
 *
8
 * http://www.apache.org/licenses/LICENSE-2.0
9
 *
10
 * Unless required by applicable law or agreed to in writing, software
11
 * distributed under the License is distributed on an "AS IS" BASIS,
12
 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
 * See the License for the specific language governing permissions and
14
 * limitations under the License.
15
 */
16

17
package com.perl5.lang.perl.idea.project
18

19
import com.intellij.openapi.Disposable
20
import com.intellij.openapi.components.service
21
import com.intellij.openapi.project.Project
22
import org.jetbrains.annotations.TestOnly
23

24
interface PerlNamesCache : Disposable {
25
  fun getSubsNamesSet(): Set<String>
26

27
  fun getNamespacesNamesSet(): Set<String>
28

NEW
29
  fun forceCacheUpdate(callback: () -> Unit = { })
×
30

31
  fun isDisposed(): Boolean
32

33
  @TestOnly
34
  fun cleanCache()
35

36
  companion object {
37
    @JvmStatic
38
    fun getInstance(project: Project): PerlNamesCache = project.service()
1✔
39
  }
40
}
STATUS · Troubleshooting · Open an Issue · Sales · Support · CAREERS · ENTERPRISE · START FREE · SCHEDULE DEMO
ANNOUNCEMENTS · TWITTER · TOS & SLA · Supported CI Services · What's a CI service? · Automated Testing

© 2026 Coveralls, Inc