-
Notifications
You must be signed in to change notification settings - Fork 0
Update ParallelizableBuildSummaryPlugin.m to fix Windows filepath issue. #3
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
Changes from 1 commit
7d26284
5893f74
1a3d7e7
d88bc0f
5ef6f3c
b66cb64
b03f024
e72f7c4
588a9e1
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -1,6 +1,6 @@ | ||
| classdef ParallelizableBuildSummaryPlugin < matlab.buildtool.plugins.BuildRunnerPlugin | ||
|
|
||
| % Copyright 2025 The MathWorks, Inc. | ||
| % Copyright 2025-2026 The MathWorks, Inc. | ||
|
|
||
| properties | ||
| TempFolder | ||
|
|
@@ -44,18 +44,28 @@ function runBuild(plugin, pluginData) | |
| function runTask(plugin, pluginData) | ||
| runTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData); | ||
|
|
||
| name = fullfile(plugin.TempFolder, pluginData.Name + ".mat"); | ||
| name = fullfile(plugin.TempFolder, matlab.lang.internal.uuid() + ".mat"); | ||
| taskDetail = getCommonTaskDetail(pluginData); | ||
| save(name, "taskDetail"); | ||
|
|
||
| try | ||
| save(name, "taskDetail"); | ||
| catch e | ||
| warning("buildframework:BuildSummaryPlugin:UnableToSaveTrace", "Unable to save an artifact required to create the MATLAB build summary table"); | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Not directly related to this review but these error/warning ids and package names are not currently consistent with our guidelines. The first component should relate to the product containing the code (I believe we use "ciplugins" on Jenkins). I opened an issue to track this: #4 |
||
| end | ||
| end | ||
|
|
||
| function skipTask(plugin, pluginData) | ||
| skipTask@matlab.buildtool.plugins.BuildRunnerPlugin(plugin, pluginData); | ||
|
|
||
| name = fullfile(plugin.TempFolder, pluginData.Name + ".mat"); | ||
| name = fullfile(plugin.TempFolder, matlab.lang.internal.uuid() + ".mat"); | ||
| taskDetail = getCommonTaskDetail(pluginData); | ||
| taskDetail.skipReason = pluginData.SkipReason; | ||
| save(name, "taskDetail"); | ||
|
|
||
| try | ||
| save(name, "taskDetail"); | ||
| catch e | ||
| warning("buildframework:BuildSummaryPlugin:UnableToSaveTrace", "Unable to save an artifact required to create the MATLAB build summary table"); | ||
| end | ||
| end | ||
| end | ||
| end | ||
|
|
||
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.
We should try to avoid using internal packages, especially in code outside of the base product like this. What about using
matlab.lang.makeValidNameto turn the task name into a valid identifier, which should also be a valid filename?