alibaba / alibaba/QLExpress

如何检测存在循环依赖的macro?

Open
#353 2 comments 0 reactions 0 assignees View on GitHub
Dominant language
Java
Stars
5.6k
Forks
1.2k
PR merge metrics
No merged PRs in 30d

Description

runner.addMacro("是否优秀", "计算平均成绩>90");
runner.addMacro("计算平均成绩", "(语文+数学+英语)/3.0");
runner.addMacro("计算平均成绩3", "计算平均成绩2");
runner.addMacro("计算平均成绩2", "计算平均成绩3");

计算平均成绩3 和 计算平均成绩2 , 存在循环依赖,我如何进行检测?

Contributor guide

No contributing guide indexed for this repository

Research direction

Start at the macro APIs used by runner.addMacro and trace how the two mutually referencing macros are resolved or evaluated. Reproduce the example with 计算平均成绩2 and 计算平均成绩3; done means the circular dependency is detected and reported instead of continuing indefinitely.

Written by the indexing model from the issue text.

Assessment

Tech stack
java
Domain
compilers
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.