Skip to content

Commit 68ba92f

Browse files
committed
Remove adding constants in Compilation.GetVariables()
Added framework-dependent publish profile
1 parent b9b613c commit 68ba92f

File tree

4 files changed

+13
-13
lines changed

4 files changed

+13
-13
lines changed

FanScript.Cli/publish.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ $publishDir = './bin/Publish'
77

88
foreach ($profile in $profiles) {
99
Write-Host "Publishing $profile"
10-
dotnet publish -o "$publishDir/$profile/" --sc -c 'Release' -r $profile
10+
if ($profile -eq 'framework-dependent') {
11+
dotnet publish -o "$publishDir/$profile/" --no-self-contained -c 'Release' /p:PublishSingleFile=false
12+
}
13+
else {
14+
dotnet publish -o "$publishDir/$profile/" --sc -c 'Release' -r $profile
15+
}
1116
}
1217

1318
Write-Host "Published $($profiles.Count) profile(s)"

FanScript.LangServer/publish.ps1

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,12 @@ $publishDir = './bin/Publish'
77

88
foreach ($profile in $profiles) {
99
Write-Host "Publishing $profile"
10-
dotnet publish -o "$publishDir/$profile/" --sc -c 'Release' -r $profile
10+
if ($profile -eq 'framework-dependent') {
11+
dotnet publish -o "$publishDir/$profile/" --no-self-contained -c 'Release' /p:PublishSingleFile=false
12+
}
13+
else {
14+
dotnet publish -o "$publishDir/$profile/" --sc -c 'Release' -r $profile
15+
}
1116
}
1217

1318
Write-Host "Published $($profiles.Count) profile(s)"

FanScript/Compiler/Compilation.cs

Lines changed: 0 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -78,16 +78,6 @@ public IEnumerable<VariableSymbol> GetVariables()
7878
Compilation? submission = this;
7979
HashSet<string> seenVariables = new HashSet<string>();
8080

81-
foreach (var group in Constants.Groups)
82-
{
83-
foreach (var con in group.Values)
84-
{
85-
VariableSymbol var = new BasicVariableSymbol(group.Name + con.Name, Modifiers.Constant | Modifiers.Global, group.Type);
86-
var.Initialize(new BoundConstant(con.Value));
87-
yield return var;
88-
}
89-
}
90-
9181
while (submission is not null)
9282
{
9383
foreach (VariableSymbol variable in submission.Variables)

publish.ps1

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,7 @@ Param (
33
[string]$version
44
)
55

6-
$profiles = 'win-x64', 'win-arm64', 'linux-x64', 'linux-arm64'
6+
$profiles = 'win-x64', 'win-arm64', 'linux-x64', 'linux-arm64', 'framework-dependent'
77

88
Function Publish-Proj
99
{

0 commit comments

Comments
 (0)