Comments (4)
Thank you for reporting. I'll take a look and keep you posted
from lava-test-coverage.
I tried to reproduce by putting the following code into 1 of my unity c# scripts:
void CourtineStarter() {
StartCoroutine(WaitForFrames(1, () => {
Debug.Log("Lambda call");
}));
}
public static IEnumerator WaitForFrames(int frames, Action callback) {
for (int i = 0; i < frames; i++) {
yield return new WaitForEndOfFrame();
}
callback();
}
and it got instrumented so it's not related to lambdas:
void CourtineStarter() {
LavaHelper.SendStats("MainController.cs","ce2e5759-c84f-4a6c-b883-6c8b7aa28baa","473","function");
StartCoroutine(WaitForFrames(1, () => {
Debug.Log("Lambda call");
}));
}
public static IEnumerator WaitForFrames(int frames, Action callback) {
LavaHelper.SendStats("MainController.cs","b81c2895-3353-4a14-9c4d-09c30818996b","479","function");
for (int i = 0; i < frames; i++) {
LavaHelper.SendStats("MainController.cs","a75067c6-724f-4069-be73-dd976512d226","480","loop");
yield return new WaitForEndOfFrame();
}
callback();
}
The exception you got is related to
p = re.compile(r'(class)[\s]*[\w]+')
var = p.search(file_content[l])
if var is not None:
class_name = var.string[var.regs[0][0]:var.regs[0][1]].split(' ')[
1]
it relates to getting class name. Could you send me all class declarations from the script that causes the issue?
example:
public class MainController : MonoBehaviour
from lava-test-coverage.
It throws the error when handling this class:
public class GameManager : NetworkBehaviour {
which has this singleton inside it:
private static GameManager instance;
public static GameManager Singleton
{
get { return instance; }
set
{
if (value.GetType().IsSubclassOf(typeof(GameManager)))
{
instance = value;
}
}
}
Other scripts that inherit from NetworkBehaviour work fine btw.
from lava-test-coverage.
Fixed in commit 4459031dd8e8b4116fcc6cca6b569aeb4dc597e0
The problem was with
if (value.GetType().IsSubclassOf(typeof(GameManager)))
and this regex responsible for getting class name:
(class)[\s]*[\w]+
it was detecting 'IsSubclassOf' string and tried to extract class name from it.
Updating regex to:
[\s]+(class)[\s]*[\w]+
fixed the issue.
Please reopen if it still exists for you. Thanks !
from lava-test-coverage.
Related Issues (8)
- In version-3, can it support for Angular app HOT 1
- Could not find a version that satisfies the requirement re (from versions: none) HOT 1
- Documentation on API usage HOT 4
- Introduce endpoints to automate lava processes HOT 1
- create documentation for api endpoints that can be used by 3rd party
- add support for multiple projects
- migrate to python 3 HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from lava-test-coverage.