Skip to content

Commit 8d07a53

Browse files
authored
Fix AutoML's reference to LightGbm (dotnet#4358)
AutoML has a reference to LightGbm, however it is getting the wrong version number in the dependency. Instead of `1.4.0-preview...`, it is getting `0.16.0-preview...`. This is because the casing in the reference is incorrect. Since the casing is incorrect, when evaluating the LightGbm project as a reference, its name no longer matches the casing in the `StableProjects` list, so it no longer thinks it is stable, and gets the unstable version. The fix is to fix the casing, and use case-insensitve checks when evaluating IsStableProject. Fix dotnet#4354
1 parent eacddd8 commit 8d07a53

File tree

2 files changed

+5
-3
lines changed

2 files changed

+5
-3
lines changed

build/BranchInfo.props

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,9 +20,11 @@
2020
Microsoft.ML.TensorFlow;
2121
Microsoft.ML.OnnxTransformer;
2222
</StableProjects>
23-
<IsStableProject Condition="'$(MSBuildProjectName.Contains(.symbols))' == 'false'">$(StableProjects.Contains($(MSBuildProjectName)))</IsStableProject>
24-
<IsStableProject Condition="'$(MSBuildProjectName.Contains(.symbols))' == 'true'">$(StableProjects.Contains($(MSBuildProjectName.Substring(0, $(MSBuildProjectName.IndexOf(.symbols))))))</IsStableProject>
23+
<_NormalizedStableProjectName Condition="'$(MSBuildProjectName.Contains(.symbols))' == 'true'">$(MSBuildProjectName.Substring(0, $(MSBuildProjectName.IndexOf(.symbols))))</_NormalizedStableProjectName>
24+
<_NormalizedStableProjectName Condition="'$(_NormalizedStableProjectName)' == ''">$(MSBuildProjectName)</_NormalizedStableProjectName>
25+
2526
<IsStableProject Condition="'$(UseStableVersionForNativeAssets)' == 'true'">true</IsStableProject>
27+
<IsStableProject Condition="'$(StableProjects.IndexOf($(_NormalizedStableProjectName), StringComparison.OrdinalIgnoreCase))' != '-1'">true</IsStableProject>
2628
</PropertyGroup>
2729
<PropertyGroup Condition="'$(IsStableProject)' == 'true'">
2830
<MajorVersion>1</MajorVersion>

pkg/Microsoft.ML.AutoML/Microsoft.ML.AutoML.nupkgproj

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77

88
<ItemGroup>
99
<ProjectReference Include="../Microsoft.ML/Microsoft.ML.nupkgproj" />
10-
<ProjectReference Include="../Microsoft.ML.LightGBM/Microsoft.ML.LightGBM.nupkgproj" />
10+
<ProjectReference Include="../Microsoft.ML.LightGbm/Microsoft.ML.LightGbm.nupkgproj" />
1111
<ProjectReference Include="../Microsoft.ML.Mkl.Components/Microsoft.ML.Mkl.Components.nupkgproj" />
1212
<ProjectReference Include="../Microsoft.ML.Recommender/Microsoft.ML.Recommender.nupkgproj" />
1313
</ItemGroup>

0 commit comments

Comments
 (0)