Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Suggestion: Duplicate fields level and parentTag? in FireTag #524

Open
abcdefguan opened this issue Mar 25, 2021 · 1 comment
Open

Suggestion: Duplicate fields level and parentTag? in FireTag #524

abcdefguan opened this issue Mar 25, 2021 · 1 comment

Comments

@abcdefguan
Copy link
Contributor

abcdefguan commented Mar 25, 2021

As of the current implementation, the fields level and parentTag? in FireTag are duplicates.

When parentTag is undefined, level is 1. When parentTag is defined, level is 2.
This means that unless we're planning to support multilevel tags (ie level > 2), we don't need the level field in FireTag and can instead derive the level by looking at whether parentTag is defined.
If we eliminate the level field, we can avoid internal invariants on our data types and reduce the risk of breaking these internal invariants, which can cause bugs.

@ngwattcos
Copy link
Member

Good point. I resolved a bug with these just last semester. I think it's better to restructure the data going forward with some kind of parenting or child relationships, not considering levels.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants