Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
163 commits
Select commit Hold shift + click to select a range
b869e16
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 2, 2019
3e7cdd5
debug formatting (#7196)
dsyme Aug 2, 2019
3a479d8
test output (#7289)
forki Aug 2, 2019
29bf51a
Move WrongSyntaxInForLoop test (#7297)
forki Aug 2, 2019
31388f7
Moved CodeGen/EmittedIL/LiteralValue over to NUnit (#7291)
sergey-tihon Aug 2, 2019
7c7a87b
Activate suggestions in unit tests and move some tests (#7251)
forki Aug 2, 2019
73e4f18
"Dont warn external function as unused" test moved (#7341)
forki Aug 2, 2019
4286c6a
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 2, 2019
2990429
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 3, 2019
5a387b6
[master] Update dependencies from dotnet/arcade (#7355)
dotnet-maestro[bot] Aug 5, 2019
fc75bb2
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 6, 2019
87cd2df
Cambridge test suite - minor issues (#7353)
KevinRansom Aug 6, 2019
ea48507
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 7, 2019
6a648d8
Make DoesIdentifierNeedQuotation public (#7365)
auduchinok Aug 8, 2019
f24310d
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 8, 2019
5f35d4e
update build definition to use stages (#7361)
brettfo Aug 8, 2019
d070d17
Netcoreapp3 (#7359)
KevinRansom Aug 8, 2019
faffb13
move attribution of F# Software Foundation to package description (#7…
brettfo Aug 9, 2019
f72ab4c
Re-enable surface area tests in master branch (#7332)
KevinRansom Aug 9, 2019
816aaa9
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 9, 2019
0353825
Moved CodeGen/EmittedIL/Mutation over to NUnit (#7352)
sergey-tihon Aug 9, 2019
3cdc94f
Use GetFullPath when determining the full path in handling command li…
cartermp Aug 9, 2019
9be20d5
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 10, 2019
05c558a
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 11, 2019
e1b8537
[master] Update dependencies from dotnet/arcade (#7388)
dotnet-maestro[bot] Aug 13, 2019
6e9c4be
upload VSTS drop during internal build (#7392)
brettfo Aug 13, 2019
ee0b0d5
Update dependencies from https://github.com/dotnet/arcade build 20190…
Aug 14, 2019
cf96f22
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 16, 2019
4bd06fc
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 17, 2019
0dab329
apply hack to pre-restore FSharp.Core 4.6.2
brettfo Aug 19, 2019
0288745
pull all unit test assemblies from NuGet packages (#7378)
brettfo Aug 10, 2019
129dfa4
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 20, 2019
2e78ab7
Merge pull request #7424 from brettfo/package-restore
brettfo Aug 20, 2019
a18d185
remove package restore hack and don't allow package fallback folders …
brettfo Aug 21, 2019
dc7493f
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 21, 2019
3471e1c
Fix #5729 (#6352)
gdziadkiewicz Aug 21, 2019
6ab0c50
Merge pull request #7399 from dotnet/darc-master-8677af5b-d393-44df-8…
mmitche Aug 21, 2019
503c391
add FSharp.Compiler.Scripting (#7437)
brettfo Aug 23, 2019
168e150
IMAGE_DEBUG_TYPE_CHECKSUMPDB version in pdb writer (#7443)
chuckries Aug 23, 2019
f5a8360
[master] Update dependencies from dotnet/arcade (#7438)
dotnet-maestro[bot] Aug 24, 2019
da2a9c7
FCS Doc update - SourceText (#7446)
0x6a62 Aug 24, 2019
9247a17
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 24, 2019
ffcf4ee
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Aug 25, 2019
041c40b
Merge pull request #7449 from dotnet/darc-master-b777ffc0-5c64-490d-8…
mmitche Aug 25, 2019
c22fa0b
Fix #3113 by porting the relevant roslyn codeand integrate it into th…
matthid Aug 26, 2019
03da166
update package feed url (#7459)
brettfo Aug 28, 2019
783ae80
#6928 - Removed SByte and Byte from default case requirement and adde…
gdziadkiewicz Aug 29, 2019
8710f8c
Dynamic compiling in Unity Player (2019.1.6f1) (#7427)
JanWosnitza Aug 29, 2019
afd2b76
Fix native resource issue with emptry streams
KevinRansom Aug 29, 2019
20f79d8
Update src/absil/cvtres.fs
KevinRansom Aug 29, 2019
b7ffe4a
Merge pull request #7461 from KevinRansom/cvtres
KevinRansom Aug 29, 2019
927fec6
Fix record pattern ranges (#7471)
auduchinok Aug 30, 2019
7c983b3
[master] Update dependencies from dotnet/arcade (#7452)
dotnet-maestro[bot] Sep 1, 2019
68fd9c1
fix documentation typos (#7420)
0x6a62 Sep 2, 2019
d9c253a
cleanup cvtres.fs (#7476)
dsyme Sep 3, 2019
aa270fc
Allow resource text to work with %x format strings (#7474)
KevinRansom Sep 3, 2019
edf434b
turn off broken source link validation (#7479)
brettfo Sep 3, 2019
321296b
--standalone type forwarding (#7462)
KevinRansom Sep 4, 2019
b651877
Remove FX_NO_LINKED_RESOURCES (#7480)
KevinRansom Sep 4, 2019
5e07191
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 4, 2019
49eeb63
Disallow attributes on type extensions (#7481)
nelson-wu Sep 4, 2019
7089d2a
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 5, 2019
8e26259
add VS insertion logic to build pipeline (#7500)
brettfo Sep 5, 2019
c9a244e
add doc with links to all internal build definitions, etc. (#7505)
brettfo Sep 6, 2019
e64a812
Fix ctrl - c handling on the coreclr (#7495)
KevinRansom Sep 6, 2019
570bd57
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 6, 2019
e3030dd
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 6, 2019
a07ab85
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 7, 2019
7f93253
Add a missing word to the comment (#7517)
ForNeVeR Sep 7, 2019
371c196
[master] Update dependencies from dotnet/arcade (#7522)
dotnet-maestro[bot] Sep 9, 2019
1dcbcd4
cleanup FX_LCIDFROMCODEPAGE (#7509)
KevinRansom Sep 9, 2019
5e2a563
cleanup compilingFsLib (#7510)
KevinRansom Sep 9, 2019
8413dac
Remove Dead code --- BigInteger (#7511)
KevinRansom Sep 9, 2019
384efb2
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 10, 2019
f5e20d1
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 11, 2019
4e1c755
Merge pull request #7535 from dotnet/darc-master-028c1ccd-912d-4623-9…
brettfo Sep 11, 2019
e4a62fd
Minor cleanup, do not check assembly for string concat optimization (…
TIHan Sep 11, 2019
742e897
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 12, 2019
3ce13ed
FX_NO_SYSTEM_CONSOLE and EXTRAS_FOR_SILVERLIGHT_COMPILER are never se…
KevinRansom Sep 13, 2019
b9e4b07
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 13, 2019
613bb42
Updates README with new non-vs-dependent build switch. (#7565)
ChrSteinert Sep 16, 2019
cbf0e98
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 16, 2019
dda5426
fire events when script host resolves assembly reference (#7571)
brettfo Sep 17, 2019
2e41de6
update insert task to v3 (#7574)
brettfo Sep 17, 2019
031868f
Remove the requirement for explicit FSharp.Core reference need --nofr…
KevinRansom Sep 18, 2019
dc5e294
Re-enable magic-resolver in fsi for coreclr (#7598)
KevinRansom Sep 19, 2019
7ce0d57
Merge remote-tracking branch 'upstream/release/dev16.3' into merges/r…
brettfo Sep 23, 2019
7adaacf
Merge pull request #7611 from dotnet/merges/release/dev16.3-to-master
brettfo Sep 24, 2019
b834b12
relax multiple load objection (#7613)
KevinRansom Sep 24, 2019
d44950e
Relax --noframework for mscorlib, netstandard and system.runtime (#7612)
KevinRansom Sep 24, 2019
7e7d61b
add build telemetry for Linux/MacOS builds
brettfo Sep 26, 2019
f495486
Merge pull request #7638 from brettfo/build-telemetry
KevinRansom Sep 26, 2019
8121dd5
add workspace and diagnostics to lsp (#7006)
brettfo Sep 27, 2019
4c11407
Less subsequent filtering in completion (#7650)
auduchinok Sep 27, 2019
f4c38f0
Fix typo: abilty -> ability (#7647)
Youssef1313 Sep 27, 2019
dfbfeec
Make ILPreTypeDef interface (#7649)
auduchinok Sep 27, 2019
5a813b5
Add FSharpDisplayContext.WithShortTypeNames(bool) (#7651)
auduchinok Sep 27, 2019
b2c8d66
Change cancellation test to not depend on how AwaitTask works (#7467)
Frassle Sep 27, 2019
fd440a9
ensure localized menu name is used for 'F# Interactive' (#7652)
brettfo Sep 27, 2019
b2f996b
typo: ahve -> have (#7648)
Youssef1313 Sep 27, 2019
861d0b0
Remove unused opens
auduchinok Sep 27, 2019
613fcae
Remove unused opens
auduchinok Sep 27, 2019
1e1be1b
Initial work
TIHan Oct 25, 2019
2b1e29c
Quick re-name for OptimizeMethod(s) to OptimizeObjectExprMethod(s).
TIHan Oct 25, 2019
0a6764a
Delaying lambdas working
TIHan Oct 26, 2019
4df0e4f
fix regression test, starting to add linear match expr handling
TIHan Oct 28, 2019
bf04355
Minor code move
TIHan Oct 28, 2019
99a2ca2
Might have it working
TIHan Oct 30, 2019
f3ab72c
Fixed issue not capturing locals
TIHan Oct 30, 2019
95d8f1b
Cleanup, tests pass
TIHan Oct 31, 2019
a1e04ef
We do not need this anymore
TIHan Oct 31, 2019
ee9a677
Remove commented code
TIHan Oct 31, 2019
f166d6e
Changed test so coreclr can pass
TIHan Oct 31, 2019
d22a018
Do not delay lambda generation for now
TIHan Oct 31, 2019
1fe8051
Get rid of optimize flag in test
TIHan Oct 31, 2019
eb333d9
Removed unrelated code changes to the fix
TIHan Nov 1, 2019
02b41ce
Removed rest of unrelated code changes to fix
TIHan Nov 1, 2019
8ddce91
Removed quadratic append
TIHan Nov 1, 2019
74196ae
Moved local rec functions into top module
TIHan Nov 1, 2019
e6baf7f
Added GenDecisionTreeTargetQueue
TIHan Nov 1, 2019
8dfcc6a
Instead of using a queue, use CPS through other functions
TIHan Nov 1, 2019
b663ffc
Minor cleanup
TIHan Nov 1, 2019
b5a9996
Pure CPS
TIHan Nov 1, 2019
2d5f5f4
update tool requirement to VS 16.3 (#7671)
brettfo Sep 30, 2019
c3406e7
Consider '_' for members with access modifiers (#7631)
gusty Oct 1, 2019
e2efa30
return the last-computed value when evaluating script code (#7524)
brettfo Sep 10, 2019
59c8dc8
Return correct value with multi-line F# submissions (#7699)
KevinRansom Oct 4, 2019
f900cbf
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Sep 28, 2019
15cc012
Update dependencies from https://github.com/dotnet/arcade build 20190…
dotnet-maestro[bot] Oct 1, 2019
dfb94a2
Update dependencies from https://github.com/dotnet/arcade build 20191…
dotnet-maestro[bot] Oct 2, 2019
cd46128
Update dependencies from https://github.com/dotnet/arcade build 20191…
dotnet-maestro[bot] Oct 3, 2019
9f2f852
Merge pull request #7702 from KevinRansom/cp_it
brettfo Oct 4, 2019
da0961d
Merge pull request #7666 from dotnet/darc-master-e0c9f4bf-0d57-4f79-a…
brettfo Oct 4, 2019
ff1d3f3
only install 2.1 SDK in non source build scenarios (#7703)
brettfo Oct 4, 2019
70deae2
create a specific exception type to represent FSI compilation errors …
brettfo Oct 8, 2019
cf9ec3e
Fix parsing default language version (#7721)
auduchinok Oct 11, 2019
c666329
Ref assemblies for non sdk apps (#7725)
KevinRansom Oct 14, 2019
c20ef80
Ignore Mac trash (#7729)
auduchinok Oct 15, 2019
b0a8397
allow fsi evaluations to be cancelled (#7736)
brettfo Oct 18, 2019
2b850b6
Remove dead code (#7755)
KevinRansom Oct 22, 2019
cb65c31
update perl test runner (#7779)
brettfo Oct 30, 2019
96fc7b0
Voption tostring and other stuff (#7712)
cartermp Oct 30, 2019
b7bc2ca
Optimize Seq.Last to behave like Seq.Length (incl. tests) (#7765)
goswinr Oct 30, 2019
2bc8fed
Fix some typos (#7665)
auduchinok Oct 30, 2019
7a39de2
Fix member declaration ranges (#7676)
auduchinok Oct 31, 2019
4ee6fec
Use framework Queue (#7709)
cartermp Oct 31, 2019
bd106f8
Type check: recover in Set expressions when left side value is not mu…
auduchinok Oct 31, 2019
f0b9f6a
Merge branch 'master' into unusedOpens
KevinRansom Oct 31, 2019
70ee86d
Update DotNetFrameworkDependencies.fs
KevinRansom Oct 31, 2019
8e4a2f1
Merge pull request #7654 from auduchinok/unusedOpens
KevinRansom Oct 31, 2019
a373a5c
Add tests/fsharp/readme.md (#6681)
smoothdeveloper Oct 31, 2019
a276fff
Use cache value if available early in a let binding. Stops from havin…
TIHan Nov 2, 2019
e55c53f
Merge remote-tracking branch 'upstream/master' into bug/linear-match-…
TIHan Nov 3, 2019
1cf46f7
[master] Update dependencies from dotnet/arcade (#7706)
dotnet-maestro[bot] Nov 5, 2019
56de2cb
Merge pull request #7809 from TIHan/opt/freevars-let
KevinRansom Nov 6, 2019
7cf21dd
Update dependencies from https://github.com/dotnet/arcade build 20191…
dotnet-maestro[bot] Nov 6, 2019
a8f37b6
Merge pull request #7678 from TIHan/bug/linear-match-overflow-fix
KevinRansom Nov 6, 2019
671ff7f
Merge pull request #7820 from dotnet/darc-master-52cb7757-26bc-47d3-b…
KevinRansom Nov 6, 2019
19955c5
Update dependencies from https://github.com/dotnet/arcade build 20191…
dotnet-maestro[bot] Nov 7, 2019
ce18cc5
Update dependencies from https://github.com/dotnet/arcade build 20191…
dotnet-maestro[bot] Nov 8, 2019
f1b356e
set insertion payload name (#7830)
brettfo Nov 8, 2019
2f87d5f
Fix SynExpr.ImplicitZero doc comment (#7831)
auduchinok Nov 8, 2019
2c90c61
Merge pull request #7829 from dotnet/darc-master-0e2010c0-8299-42c7-a…
brettfo Nov 9, 2019
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 2 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -223,9 +223,9 @@ source_link.json
.vs/
System.ValueTuple.dll
tests/fsharpqa/testenv/bin/System.ValueTuple.dll
**/.fake
lib/netcore/fsc/bin/
!lib/bootstrap/signed/**/*
*/.fake
/fcs/packages/
*/paket-files/
/fcs/TestResult.xml
Expand All @@ -237,3 +237,4 @@ msbuild.binlog

.ionide
.vscode
**/.DS_Store
2 changes: 2 additions & 0 deletions FSharpBuild.Directory.Build.props
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,8 @@

<!-- nuget -->
<PropertyGroup>
<PackageIconFullPath>$(MSBuildThisFileDirectory)icon.png</PackageIconFullPath>

<!-- Point to artifacts folder as an additional nuget package source -->
<RestoreAdditionalProjectSources Condition = "Exists('$(ArtifactsPackagesDir)') and '$(RestoreAdditionalProjectSources)' != ''">$(RestoreAdditionalProjectSources);$(ArtifactsPackagesDir)</RestoreAdditionalProjectSources>
<RestoreAdditionalProjectSources Condition = "Exists('$(ArtifactsPackagesDir)') and '$(RestoreAdditionalProjectSources)' == ''">$(ArtifactsPackagesDir)</RestoreAdditionalProjectSources>
Expand Down
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ interactive service that can be used for embedding F# scripting into your applic

This repo exists as a downstream packaging repository for the [FSharp.Compiler.Service](https://www.nuget.org/packages/FSharp.Compiler.Service) NuGet Package. It serves the following purposes _only_:


* Release packaging
* Hosting [public documentation](http://fsharp.github.io/FSharp.Compiler.Service/)
* Serving as a stable base for Fable
Expand Down
4 changes: 3 additions & 1 deletion eng/Build.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -359,14 +359,16 @@ try {
$resultsLog = "test-net40-fsharpqa-results.log"
$errorLog = "test-net40-fsharpqa-errors.log"
$failLog = "test-net40-fsharpqa-errors"
$perlExe = "$env:USERPROFILE\.nuget\packages\StrawberryPerl64\5.22.2.1\Tools\perl\bin\perl.exe"
$perlPackageRoot = "$env:USERPROFILE\.nuget\packages\StrawberryPerl\5.28.0.1";
$perlExe = "$perlPackageRoot\bin\perl.exe"
Create-Directory $resultsRoot
UpdatePath
$env:HOSTED_COMPILER = 1
$env:CSC_PIPE = "$env:USERPROFILE\.nuget\packages\Microsoft.Net.Compilers\2.7.0\tools\csc.exe"
$env:FSCOREDLLPATH = "$ArtifactsDir\bin\fsc\$configuration\net472\FSharp.Core.dll"
$env:LINK_EXE = "$RepoRoot\tests\fsharpqa\testenv\bin\link\link.exe"
$env:OSARCH = $env:PROCESSOR_ARCHITECTURE
$env:PERL5LIB = "$perlPackageRoot\vendor\lib"
Exec-Console $perlExe """$RepoRoot\tests\fsharpqa\testenv\bin\runall.pl"" -resultsroot ""$resultsRoot"" -results $resultsLog -log $errorLog -fail $failLog -cleanup:no -procs:$env:NUMBER_OF_PROCESSORS"
Pop-Location
}
Expand Down
4 changes: 2 additions & 2 deletions eng/Version.Details.xml
Original file line number Diff line number Diff line change
Expand Up @@ -3,9 +3,9 @@
<ProductDependencies>
</ProductDependencies>
<ToolsetDependencies>
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19476.6">
<Dependency Name="Microsoft.DotNet.Arcade.Sdk" Version="5.0.0-beta.19557.20">
<Uri>https://github.com/dotnet/arcade</Uri>
<Sha>b449f372df1a3374ebdc85f42ff137dcda08776b</Sha>
<Sha>b62f1617f2c453497fd55697c04dd8021a38dc17</Sha>
</Dependency>
</ToolsetDependencies>
</Dependencies>
2 changes: 1 addition & 1 deletion eng/Versions.props
Original file line number Diff line number Diff line change
Expand Up @@ -182,7 +182,7 @@
<NUnitLiteVersion>3.11.0</NUnitLiteVersion>
<NunitXmlTestLoggerVersion>2.1.36</NunitXmlTestLoggerVersion>
<RoslynToolsSignToolVersion>1.0.0-beta2-dev3</RoslynToolsSignToolVersion>
<StrawberryPerl64Version>5.22.2.1</StrawberryPerl64Version>
<StrawberryPerlVersion>5.28.0.1</StrawberryPerlVersion>
<StreamJsonRpcVersion>2.0.187</StreamJsonRpcVersion>
</PropertyGroup>
</Project>
8 changes: 7 additions & 1 deletion eng/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -60,6 +60,7 @@ force_bootstrap=false
ci=false
skip_analyzers=false
prepare_machine=false
source_build=false
properties=""

docker=false
Expand Down Expand Up @@ -131,6 +132,9 @@ while [[ $# > 0 ]]; do
;;
/p:*)
properties="$properties $1"
if [[ "$1" == "/p:dotnetbuildfromsource=true" ]]; then
source_build=true
fi
;;
*)
echo "Invalid argument: $1"
Expand Down Expand Up @@ -277,7 +281,9 @@ function BuildSolution {
InitializeDotNetCli $restore

# enable us to build netcoreapp2.1 binaries
InstallDotNetSdk $_InitializeDotNetCli 2.1.503
if [[ "$source_build" != true ]]; then
InstallDotNetSdk $_InitializeDotNetCli 2.1.503
fi

BuildSolution

Expand Down
6 changes: 4 additions & 2 deletions eng/common/PublishToSymbolServers.proj
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,8 @@
<PropertyGroup>
<DotNetSymbolExpirationInDays Condition="'$(DotNetSymbolExpirationInDays)' == ''">3650</DotNetSymbolExpirationInDays>
<PublishToSymbolServer>true</PublishToSymbolServer>
<PublishToSymWeb Condition="'$(PublishToSymWeb)' == ''">true</PublishToSymWeb>
<PublishToMSDL Condition="'$(PublishToMSDL)' == ''">true</PublishToMSDL>
<PublishToSymbolServer Condition="'@(FilesToPublishToSymbolServer)' == '' and '@(PackagesToPublishToSymbolServer)' == ''">false</PublishToSymbolServer>
</PropertyGroup>

Expand All @@ -56,7 +58,7 @@
DryRun="false"
ConvertPortablePdbsToWindowsPdbs="false"
PdbConversionTreatAsWarning=""
Condition="$(PublishToSymbolServer)"/>
Condition="$(PublishToSymbolServer) and $(PublishToMSDL)"/>

<!--
Symbol Uploader: SymWeb
Expand All @@ -73,7 +75,7 @@
DryRun="false"
ConvertPortablePdbsToWindowsPdbs="false"
PdbConversionTreatAsWarning=""
Condition="$(PublishToSymbolServer)"/>
Condition="$(PublishToSymbolServer) and $(PublishToSymWeb)"/>
</Target>

<ItemGroup>
Expand Down
127 changes: 127 additions & 0 deletions eng/common/SetupNugetSources.ps1
Original file line number Diff line number Diff line change
@@ -0,0 +1,127 @@
# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# - task: PowerShell@2
# displayName: Setup Private Feeds Credentials
# condition: eq(variables['Agent.OS'], 'Windows_NT')
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.ps1
# arguments: -ConfigFile ${Env:BUILD_SOURCESDIRECTORY}/NuGet.config -Password $Env:Token
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)

[CmdletBinding()]
param (
[Parameter(Mandatory = $true)][string]$ConfigFile,
[Parameter(Mandatory = $true)][string]$Password
)

$ErrorActionPreference = "Stop"
Set-StrictMode -Version 2.0
[Net.ServicePointManager]::SecurityProtocol = [Net.SecurityProtocolType]::Tls12

. $PSScriptRoot\tools.ps1

# Add source entry to PackageSources
function AddPackageSource($sources, $SourceName, $SourceEndPoint, $creds, $Username, $Password) {
$packageSource = $sources.SelectSingleNode("add[@key='$SourceName']")

if ($packageSource -eq $null)
{
$packageSource = $doc.CreateElement("add")
$packageSource.SetAttribute("key", $SourceName)
$packageSource.SetAttribute("value", $SourceEndPoint)
$sources.AppendChild($packageSource) | Out-Null
}
else {
Write-Host "Package source $SourceName already present."
}

AddCredential -Creds $creds -Source $SourceName -Username $Username -Password $Password
}

# Add a credential node for the specified source
function AddCredential($creds, $source, $username, $password) {
# Looks for credential configuration for the given SourceName. Create it if none is found.
$sourceElement = $creds.SelectSingleNode($Source)
if ($sourceElement -eq $null)
{
$sourceElement = $doc.CreateElement($Source)
$creds.AppendChild($sourceElement) | Out-Null
}

# Add the <Username> node to the credential if none is found.
$usernameElement = $sourceElement.SelectSingleNode("add[@key='Username']")
if ($usernameElement -eq $null)
{
$usernameElement = $doc.CreateElement("add")
$usernameElement.SetAttribute("key", "Username")
$sourceElement.AppendChild($usernameElement) | Out-Null
}
$usernameElement.SetAttribute("value", $Username)

# Add the <ClearTextPassword> to the credential if none is found.
# Add it as a clear text because there is no support for encrypted ones in non-windows .Net SDKs.
# -> https://github.com/NuGet/Home/issues/5526
$passwordElement = $sourceElement.SelectSingleNode("add[@key='ClearTextPassword']")
if ($passwordElement -eq $null)
{
$passwordElement = $doc.CreateElement("add")
$passwordElement.SetAttribute("key", "ClearTextPassword")
$sourceElement.AppendChild($passwordElement) | Out-Null
}
$passwordElement.SetAttribute("value", $Password)
}

function InsertMaestroPrivateFeedCredentials($Sources, $Creds, $Password) {
$maestroPrivateSources = $Sources.SelectNodes("add[contains(@key,'darc-int')]")

Write-Host "Inserting credentials for $($maestroPrivateSources.Count) Maestro's private feeds."

ForEach ($PackageSource in $maestroPrivateSources) {
Write-Host "`tInserting credential for Maestro's feed:" $PackageSource.Key
AddCredential -Creds $creds -Source $PackageSource.Key -Username $Username -Password $Password
}
}

if (!(Test-Path $ConfigFile -PathType Leaf)) {
Write-Host "Couldn't find the file NuGet config file: $ConfigFile"
ExitWithExitCode 1
}

# Load NuGet.config
$doc = New-Object System.Xml.XmlDocument
$filename = (Get-Item $ConfigFile).FullName
$doc.Load($filename)

# Get reference to <PackageSources> or create one if none exist already
$sources = $doc.DocumentElement.SelectSingleNode("packageSources")
if ($sources -eq $null) {
$sources = $doc.CreateElement("packageSources")
$doc.DocumentElement.AppendChild($sources) | Out-Null
}

# Looks for a <PackageSourceCredentials> node. Create it if none is found.
$creds = $doc.DocumentElement.SelectSingleNode("packageSourceCredentials")
if ($creds -eq $null) {
$creds = $doc.CreateElement("packageSourceCredentials")
$doc.DocumentElement.AppendChild($creds) | Out-Null
}

# Insert credential nodes for Maestro's private feeds
InsertMaestroPrivateFeedCredentials -Sources $sources -Creds $creds -Password $Password

AddPackageSource -Sources $sources -SourceName "dotnet3-internal" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password
AddPackageSource -Sources $sources -SourceName "dotnet3-internal-transport" -SourceEndPoint "https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2" -Creds $creds -Username "dn-bot" -Password $Password

$doc.Save($filename)
117 changes: 117 additions & 0 deletions eng/common/SetupNugetSources.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,117 @@
#!/usr/bin/env bash

# This file is a temporary workaround for internal builds to be able to restore from private AzDO feeds.
# This file should be removed as part of this issue: https://github.com/dotnet/arcade/issues/4080
#
# What the script does is iterate over all package sources in the pointed NuGet.config and add a credential entry
# under <packageSourceCredentials> for each Maestro's managed private feed. Two additional credential
# entries are also added for the two private static internal feeds: dotnet3-internal and dotnet3-internal-transport.
#
# This script needs to be called in every job that will restore packages and which the base repo has
# private AzDO feeds in the NuGet.config.
#
# See example YAML call for this script below. Note the use of the variable `$(dn-bot-dnceng-artifact-feeds-rw)`
# from the AzureDevOps-Artifact-Feeds-Pats variable group.
#
# - task: Bash@3
# displayName: Setup Private Feeds Credentials
# inputs:
# filePath: $(Build.SourcesDirectory)/eng/common/SetupNugetSources.sh
# arguments: $BUILD_SOURCESDIRECTORY/NuGet.config $Token
# condition: ne(variables['Agent.OS'], 'Windows_NT')
# env:
# Token: $(dn-bot-dnceng-artifact-feeds-rw)

ConfigFile=$1
CredToken=$2
NL='\n'
TB=' '

source="${BASH_SOURCE[0]}"

# resolve $source until the file is no longer a symlink
while [[ -h "$source" ]]; do
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"
source="$(readlink "$source")"
# if $source was a relative symlink, we need to resolve it relative to the path where the
# symlink file was located
[[ $source != /* ]] && source="$scriptroot/$source"
done
scriptroot="$( cd -P "$( dirname "$source" )" && pwd )"

. "$scriptroot/tools.sh"

if [ ! -f "$ConfigFile" ]; then
echo "Couldn't find the file NuGet config file: $ConfigFile"
ExitWithExitCode 1
fi

if [[ `uname -s` == "Darwin" ]]; then
NL=$'\\\n'
TB=''
fi

# Ensure there is a <packageSources>...</packageSources> section.
grep -i "<packageSources>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding <packageSources>...</packageSources> section."
ConfigNodeHeader="<configuration>"
PackageSourcesTemplate="${TB}<packageSources>${NL}${TB}</packageSources>"

sed -i.bak "s|$ConfigNodeHeader|$ConfigNodeHeader${NL}$PackageSourcesTemplate|" NuGet.config
fi

# Ensure there is a <packageSourceCredentials>...</packageSourceCredentials> section.
grep -i "<packageSourceCredentials>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding <packageSourceCredentials>...</packageSourceCredentials> section."

PackageSourcesNodeFooter="</packageSources>"
PackageSourceCredentialsTemplate="${TB}<packageSourceCredentials>${NL}${TB}</packageSourceCredentials>"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourcesNodeFooter${NL}$PackageSourceCredentialsTemplate|" NuGet.config
fi

# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
grep -i "<add key=\"dotnet3-internal\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal to the packageSources."

PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
fi

# Ensure dotnet3-internal and dotnet3-internal-transport is in the packageSources
grep -i "<add key=\"dotnet3-internal-transport\">" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding dotnet3-internal-transport to the packageSources."

PackageSourcesNodeFooter="</packageSources>"
PackageSourceTemplate="${TB}<add key=\"dotnet3-internal-transport\" value=\"https://pkgs.dev.azure.com/dnceng/_packaging/dotnet3-internal-transport/nuget/v2\" />"

sed -i.bak "s|$PackageSourcesNodeFooter|$PackageSourceTemplate${NL}$PackageSourcesNodeFooter|" NuGet.config
fi

# I want things split line by line
PrevIFS=$IFS
IFS=$'\n'
PackageSources=$(grep -oh '"darc-int-[^"]*"' $ConfigFile | tr -d '"')
IFS=$PrevIFS

PackageSources+=('dotnet3-internal')
PackageSources+=('dotnet3-internal-transport')

for FeedName in ${PackageSources[@]} ; do
# Check if there is no existing credential for this FeedName
grep -i "<$FeedName>" $ConfigFile
if [ "$?" != "0" ]; then
echo "Adding credentials for $FeedName."

PackageSourceCredentialsNodeFooter="</packageSourceCredentials>"
NewCredential="${TB}${TB}<$FeedName>${NL}<add key=\"Username\" value=\"dn-bot\" />${NL}<add key=\"ClearTextPassword\" value=\"$CredToken\" />${NL}</$FeedName>"

sed -i.bak "s|$PackageSourceCredentialsNodeFooter|$NewCredential${NL}$PackageSourceCredentialsNodeFooter|" NuGet.config
fi
done
Loading