Skip to content

Commit b834b12

Browse files
authored
relax multiple load objection (#7613)
1 parent 7adaacf commit b834b12

15 files changed

+4
-74
lines changed

src/fsharp/CompileOps.fs

Lines changed: 4 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2572,17 +2572,13 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
25722572
let filename = ComputeMakePathAbsolute data.implicitIncludeDir r.Text
25732573
if FileSystem.SafeExists filename then
25742574
r, Some filename
2575-
else
2575+
else
25762576
// If the file doesn't exist, let reference resolution logic report the error later...
25772577
defaultCoreLibraryReference, if Range.equals r.Range rangeStartup then Some(filename) else None
25782578
match data.referencedDLLs |> List.filter (fun assemblyReference -> assemblyReference.SimpleAssemblyNameIs libraryName) with
2579-
| [r] -> nameOfDll r
2580-
| [] ->
2581-
defaultCoreLibraryReference, None
2582-
| r :: _ ->
2583-
// Recover by picking the first one.
2584-
errorR(Error(FSComp.SR.buildMultipleReferencesNotAllowed libraryName, rangeCmdArgs))
2585-
nameOfDll r
2579+
| [] -> defaultCoreLibraryReference, None
2580+
| [r]
2581+
| r :: _ -> nameOfDll r
25862582

25872583
// Look for an explicit reference to mscorlib/netstandard.dll or System.Runtime.dll and use that to compute clrRoot and targetFrameworkVersion
25882584
let primaryAssemblyReference, primaryAssemblyExplicitFilenameOpt = computeKnownDllReference(data.primaryAssembly.Name)

src/fsharp/FSComp.txt

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,6 @@ buildProductNameCommunity,"F# Compiler for F# %s"
4343
212,buildInvalidFilename,"'%s' is not a valid filename"
4444
213,buildInvalidAssemblyName,"'%s' is not a valid assembly name"
4545
214,buildInvalidPrivacy,"Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private'"
46-
215,buildMultipleReferencesNotAllowed,"Multiple references to '%s.dll' are not permitted"
4746
218,buildCannotReadAssembly,"Unable to read assembly '%s'"
4847
220,buildAssemblyResolutionFailed,"Assembly resolution failure at or near this location"
4948
221,buildImplicitModuleIsNotLegalIdentifier,"The declarations in this file will be placed in an implicit module '%s' based on the file name '%s'. However this is not a valid F# identifier, so the contents will not be accessible from other files. Consider renaming the file or adding a 'module' or 'namespace' declaration at the top of the file."

src/fsharp/xlf/FSComp.txt.cs.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">Nerozpoznané nastavení ochrany osobních údajů {0} pro spravovaný prostředek. Platné možnosti jsou public a private.</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">Víc odkazů na knihovnu {0}.dll se nepovoluje.</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">Sestavení {0} se nedá přečíst.</target>

src/fsharp/xlf/FSComp.txt.de.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">Unbekannte Datenschutzeinstellung "{0}" für verwaltete Ressource; gültige Optionen sind "public" und "private".</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">Mehrere Verweise auf "{0}.dll" sind nicht zulässig</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">Assembly "{0}" kann nicht gelesen werden.</target>

src/fsharp/xlf/FSComp.txt.es.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">Configuración de privacidad '{0}' no reconocida para un recurso administrado. Las opciones válidas son 'public' y 'private'.</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">No se permiten varias referencias a '{0}.dll'.</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">No se puede leer el ensamblado '{0}'.</target>

src/fsharp/xlf/FSComp.txt.fr.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">Paramètre de confidentialité '{0}' non reconnu pour la ressource managée, les options valides sont 'public' et 'private'</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">Les références multiples à '{0}.dll' ne sont pas autorisées</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">Impossible de lire l'assembly '{0}'</target>

src/fsharp/xlf/FSComp.txt.it.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">Impostazione di privacy '{0}' non riconosciuta per una risorsa gestita. Le opzioni valide sono 'public' e 'private'</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">Non sono consentiti più riferimenti a '{0}.dll'</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">Non è possibile leggere l'assembly '{0}'</target>

src/fsharp/xlf/FSComp.txt.ja.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">マネージド リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">'{0}.dll' に対する複数の参照は許可されていません</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">アセンブリ '{0}' を読み取れません</target>

src/fsharp/xlf/FSComp.txt.ko.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">관리되는 리소스에 대해 인식할 수 없는 개인 정보 보호 설정 '{0}'입니다. 올바른 옵션은 'public' 및 'private'입니다.</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">'{0}.dll'에 대한 다중 참조는 허용되지 않습니다.</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">'{0}' 어셈블리를 읽을 수 없습니다.</target>

src/fsharp/xlf/FSComp.txt.pl.xlf

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -267,11 +267,6 @@
267267
<target state="translated">Nierozpoznane ustawienie prywatności „{0}” dla zasobu zarządzanego. Prawidłowe opcje to „public” i „private”</target>
268268
<note />
269269
</trans-unit>
270-
<trans-unit id="buildMultipleReferencesNotAllowed">
271-
<source>Multiple references to '{0}.dll' are not permitted</source>
272-
<target state="translated">Używanie wielu odwołań do pliku „{0}.dll” jest niedozwolone</target>
273-
<note />
274-
</trans-unit>
275270
<trans-unit id="buildCannotReadAssembly">
276271
<source>Unable to read assembly '{0}'</source>
277272
<target state="translated">Nie można odczytać zestawu „{0}”</target>

0 commit comments

Comments
 (0)