-
Notifications
You must be signed in to change notification settings - Fork 535
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
feat(generate:assertTags): Enable per package assert tagging configuration #23452
Merged
Merged
Changes from 16 commits
Commits
Show all changes
23 commits
Select commit
Hold shift + click to select a range
aadc2e0
Setup tagging for tree's "fail"
CraigMacomber c16f987
Fix fail tagging
CraigMacomber 5e1ce1f
remove fail templates
CraigMacomber 89ce236
Update fail to allow tagged messages
CraigMacomber 3d5fee3
Merge branch 'main' into failTag
CraigMacomber 5c06f20
Work on comments
CraigMacomber e55dd41
fix error aggregation and extend comment
CraigMacomber a67474c
Apply suggestions from code review
CraigMacomber 2c8fe5c
workaround assert tagging to make fail call assert
CraigMacomber 137a6c2
Fix newAssetFiles typo
CraigMacomber 472cf03
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
CraigMacomber fbac2c2
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
CraigMacomber 18ae12c
Give assert tagging its own config
CraigMacomber c400e3c
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
CraigMacomber 46cfaa3
remove old config
CraigMacomber 23cc67d
Merge branch 'main' into failTag
CraigMacomber 5a7b3dc
Document config
CraigMacomber b2fca3d
Document configs
CraigMacomber 9593d26
Update generated docs
CraigMacomber 24efa74
Merge branch 'main' into failTag
CraigMacomber 01d79dc
Merge branch 'main' of https://github.com/microsoft/FluidFramework in…
CraigMacomber 240b8ab
Restrict config to only config.mjs
CraigMacomber 3d42046
Merge branch 'main' into failTag
CraigMacomber File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
267 changes: 181 additions & 86 deletions
267
build-tools/packages/build-cli/src/commands/generate/assertTags.ts
Large diffs are not rendered by default.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* @type {import("@fluid-tools/build-cli").AssertTaggingConfig} | ||
*/ | ||
export default { assertionFunctions: {} }; | ||
CraigMacomber marked this conversation as resolved.
Show resolved
Hide resolved
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,14 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* @type {import("@fluid-tools/build-cli").AssertTaggingConfig} | ||
*/ | ||
export default { | ||
assertionFunctions: { | ||
"assert": 1, | ||
"fail": 0, | ||
}, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* @type {import("@fluid-tools/build-cli").AssertTaggingConfig} | ||
*/ | ||
export default { assertionFunctions: { assertionFunctions: {} } }; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,9 @@ | ||
/*! | ||
* Copyright (c) Microsoft Corporation and contributors. All rights reserved. | ||
* Licensed under the MIT License. | ||
*/ | ||
|
||
/** | ||
* @type {import("@fluid-tools/build-cli").AssertTaggingConfig} | ||
*/ | ||
export default { assertionFunctions: {} }; |
Oops, something went wrong.
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I think you could make it work that way for this command. fluid-build supports task definitions in both places, but flub has not historically needed such a capability outside of the typetest commands. I'm inclined to leave handling individual package config to individual commands for now.
@zhenmichael Something to keep an eye on as you port commands to the new infrastructure. Are there more commands that could benefit from a general-purpose per-package config loading capability? Maybe that feature could be baked into the new PackageCommand base class from the beginning?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If you are going to look at general things we want for configuration, I think the big one thats missing is any sort of schema/validation system.
Using a library like typebox to give you errors if you have a typo in your config field names or invalid structure would be nice (instead of just casting config data parsed as json to a type an hoping its right). Would have saved me some annoyance when I messed up the nesting working on this PR.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Using typescript types in the JS config files helps prevent a lot of these errors. You're absolutely right about the stuff in package.json.