Variable Name Conflicts
Chưa có ai nhận issue này.
Đánh giá
- Độ khó
- 5/5
- Thời gian dự kiến
- Hơn một tuần
- Mức phù hợp với người mới
- 25/100
- Loại issue
- Lỗi
- Độ rõ ràng
- Khá rõ ràng
- Mức độ hoạt động
- Đình trệ
- Công nghệ
- typescript
- Lĩnh vực
- backend-api-design
Hướng nghiên cứu
Read the linked context in accordproject/web-components#197 and trace how TemplateMark variables are expanded into CiceroMark, especially the repeated partyId fields for licensee and licensor. The issue proposes distinguishing the edited field name from the model variable name, but leaves the design unresolved. Done means updates to one party no longer change the other; the issue names no tests or source files.
Do mô hình lập chỉ mục viết ra từ nội dung của issue.
Mô tả
Bug Report 🐛
In some cases, editing one variable within web-components will edit another variable making it impossible to distinguish them
Expected Behavior
Update to a variable should be propagated to the same variable in other places in the document, but not to different variables
Current Behavior
Example with the copyright license template:

Both licensor and licensee variables have type AccordParty which seems to confuse the algorithm responsible for propagating variable changes. TemplateMark holds on to the licensee and licensor variables, but those are expanded (since they are complex types) before generating the CiceroMark.
CiceroMark, TemplateMark, and Model
Model
asset CopyrightLicenseContract extends AccordContract {
/* the effective date */
o DateTime effectiveDate
/* licensee */
o AccordParty licensee
o String licenseeState
o String licenseeEntityType
o String licenseeAddress
/* licensor */
o AccordParty licensor
o String licensorState
o String licensorEntityType
o String licensorAddress
...
CiceroMark
{
"$class": "org.accordproject.ciceromark.Variable",
"value": ""Me"",
"name": "partyId",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": " ("Licensee"), a "
},
{
"$class": "org.accordproject.ciceromark.Variable",
"value": ""NY"",
"name": "licenseeState",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": " "
},
{
"$class": "org.accordproject.ciceromark.Variable",
"value": ""Company"",
"name": "licenseeEntityType",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": " with offices located at "
},
{
"$class": "org.accordproject.ciceromark.Variable",
"value": ""1 Broadway"",
"name": "licenseeAddress",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": ", and "
},
{
"$class": "org.accordproject.ciceromark.Variable",
"value": ""Myself"",
"name": "partyId",
"elementType": "String"
},
TemplateMark
{
"$class": "org.accordproject.templatemark.VariableDefinition",
"name": "licensee",
"elementType": "org.accordproject.cicero.contract.AccordParty"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": " ("Licensee"), a "
},
{
"$class": "org.accordproject.templatemark.VariableDefinition",
"name": "licenseeState",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": " "
},
{
"$class": "org.accordproject.templatemark.VariableDefinition",
"name": "licenseeEntityType",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": " with offices located at "
},
{
"$class": "org.accordproject.templatemark.VariableDefinition",
"name": "licenseeAddress",
"elementType": "String"
},
{
"$class": "org.accordproject.commonmark.Text",
"text": ", and "
},
{
"$class": "org.accordproject.templatemark.VariableDefinition",
"name": "licensor",
"elementType": "org.accordproject.cicero.contract.AccordParty"
},
Possible Solution
We need to distinguish between the name of the field to be updated when editing, and the name of the variable in the model (field name in the owning type). For complex types, those are two different things.
Perhaps we should set elementType in the CiceroMark for this example to AccordParty and the name should be licensee -- it is then up to the editor/transformation to decide on the best way to edit or render the complex type (e.g. we could use a popup with Concerto form for some complex types). In the default case that means editing or rendering the identifier (String).
We will need to distinguish between --> AccordParty and AccordParty because we would use different editors for those.
However, the variable partyId is of type String. This could make pop ups difficult to handle.
Also, how would that work when a type has multiple variables (e.g., an Address)?
The bottom line is that you need more context (how did you get to that one variable).
Context
Please see https://github.com/accordproject/web-components/issues/197 for complete context
- Ngôn ngữ chính
- TypeScript
- Star
- 86
- Fork
- 69
- Merge trung bình
- 6 phút
- Pull request đã merge (30 ngày)
- 3
Chuẩn bị môi trường
- Không có Dockerfile hay tệp Docker Compose
- Có mẫu pull request
- Đọc hướng dẫn đóng góp
Bắt đầu từ đâu
- Đọc hết issue, rồi đọc hướng dẫn đóng góp của dự án.
- Bình luận trên issue rằng bạn sẽ nhận — tránh hai người làm cùng một việc.
- Fork repository và làm thay đổi trên một nhánh.
- Mở pull request có tham chiếu số hiệu của issue.
Issue khác của accordproject/markdown-transform
-
Stale
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 35/100
accordproject/markdown-transform#679 · 2 bình luận ·
-
@accordproject/markdown-it-template has a Nerq Trust Score of 68.0/100 — verified badge availableĐang mởStale
Độ khó 1/5 Dưới một giờ Mức phù hợp với người mới 20/100
accordproject/markdown-transform#664 · 1 bình luận ·
-
Stale
Độ khó 3/5 1-2 ngày Mức phù hợp với người mới 48/100
accordproject/markdown-transform#582 · 2 bình luận ·
-
Rename CiceroMark to AgreementMarkCó thể làm lại được @anablaz đã nhận 980 ngày trước và không có pull request nào đang mở. Đang mởStale
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 20/100
accordproject/markdown-transform#536 · 4 bình luận ·
-
Help Wanted 🆘 maintainer-engaged Type: Discussion 🗣 Type: Feature Request 🛍️ Type: Need Investigation 🔬
Độ khó 5/5 Hơn một tuần Mức phù hợp với người mới 25/100
accordproject/markdown-transform#368 · 7 bình luận ·
Tất cả issue của accordproject/markdown-transform
Issue tương tự
-
Mend: dependency security vulnerability
Độ khó 1/5 1-3 giờ Mức phù hợp với người mới 65/100
fdm-monster/fdm-monster#5563 ·
Maintainer thường phản hồi trong vòng 1 ngày
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
be-BOP-io-SA/be-BOP#2849 ·
-
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 79/100
Maintainer thường phản hồi trong vòng 1 ngày
-
1️⃣ phase/under-investigation flaky/confirmed flaky/needs-decision type/bug
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 65/100
growilabs/growi#12246 · 3 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày
-
🐛 The Rulekeeper - An index run that gives up on the lock ends SucceededCó thể đã có người làm @github-actions đã nhận hôm nay. Đang mở
Độ khó 2/5 1-3 giờ Mức phù hợp với người mới 72/100
SSWConsulting/SSW.Rules#2809 · 1 bình luận ·
Maintainer thường phản hồi trong vòng 1 ngày