Skip to content

Commit

Permalink
relax multiple load objection (dotnet#7613)
Browse files Browse the repository at this point in the history
  • Loading branch information
KevinRansom authored Sep 24, 2019
1 parent 7adaacf commit b834b12
Show file tree
Hide file tree
Showing 15 changed files with 4 additions and 74 deletions.
12 changes: 4 additions & 8 deletions src/fsharp/CompileOps.fs
Original file line number Diff line number Diff line change
Expand Up @@ -2572,17 +2572,13 @@ type TcConfig private (data: TcConfigBuilder, validate: bool) =
let filename = ComputeMakePathAbsolute data.implicitIncludeDir r.Text
if FileSystem.SafeExists filename then
r, Some filename
else
else
// If the file doesn't exist, let reference resolution logic report the error later...
defaultCoreLibraryReference, if Range.equals r.Range rangeStartup then Some(filename) else None
match data.referencedDLLs |> List.filter (fun assemblyReference -> assemblyReference.SimpleAssemblyNameIs libraryName) with
| [r] -> nameOfDll r
| [] ->
defaultCoreLibraryReference, None
| r :: _ ->
// Recover by picking the first one.
errorR(Error(FSComp.SR.buildMultipleReferencesNotAllowed libraryName, rangeCmdArgs))
nameOfDll r
| [] -> defaultCoreLibraryReference, None
| [r]
| r :: _ -> nameOfDll r

// Look for an explicit reference to mscorlib/netstandard.dll or System.Runtime.dll and use that to compute clrRoot and targetFrameworkVersion
let primaryAssemblyReference, primaryAssemblyExplicitFilenameOpt = computeKnownDllReference(data.primaryAssembly.Name)
Expand Down
1 change: 0 additions & 1 deletion src/fsharp/FSComp.txt
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,6 @@ buildProductNameCommunity,"F# Compiler for F# %s"
212,buildInvalidFilename,"'%s' is not a valid filename"
213,buildInvalidAssemblyName,"'%s' is not a valid assembly name"
214,buildInvalidPrivacy,"Unrecognized privacy setting '%s' for managed resource, valid options are 'public' and 'private'"
215,buildMultipleReferencesNotAllowed,"Multiple references to '%s.dll' are not permitted"
218,buildCannotReadAssembly,"Unable to read assembly '%s'"
220,buildAssemblyResolutionFailed,"Assembly resolution failure at or near this location"
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."
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.cs.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Nerozpoznané nastavení ochrany osobních údajů {0} pro spravovaný prostředek. Platné možnosti jsou public a private.</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Víc odkazů na knihovnu {0}.dll se nepovoluje.</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Sestavení {0} se nedá přečíst.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.de.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Unbekannte Datenschutzeinstellung "{0}" für verwaltete Ressource; gültige Optionen sind "public" und "private".</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Mehrere Verweise auf "{0}.dll" sind nicht zulässig</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Assembly "{0}" kann nicht gelesen werden.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.es.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Configuración de privacidad '{0}' no reconocida para un recurso administrado. Las opciones válidas son 'public' y 'private'.</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">No se permiten varias referencias a '{0}.dll'.</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">No se puede leer el ensamblado '{0}'.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.fr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Paramètre de confidentialité '{0}' non reconnu pour la ressource managée, les options valides sont 'public' et 'private'</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Les références multiples à '{0}.dll' ne sont pas autorisées</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Impossible de lire l'assembly '{0}'</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.it.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Impostazione di privacy '{0}' non riconosciuta per una risorsa gestita. Le opzioni valide sono 'public' e 'private'</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Non sono consentiti più riferimenti a '{0}.dll'</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Non è possibile leggere l'assembly '{0}'</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.ja.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">マネージド リソースの認識されないプライバシー設定 '{0}'。有効なオプションは 'public' および 'private' です。</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">'{0}.dll' に対する複数の参照は許可されていません</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">アセンブリ '{0}' を読み取れません</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.ko.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">관리되는 리소스에 대해 인식할 수 없는 개인 정보 보호 설정 '{0}'입니다. 올바른 옵션은 'public' 및 'private'입니다.</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">'{0}.dll'에 대한 다중 참조는 허용되지 않습니다.</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">'{0}' 어셈블리를 읽을 수 없습니다.</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.pl.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Nierozpoznane ustawienie prywatności „{0}” dla zasobu zarządzanego. Prawidłowe opcje to „public” i „private”</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Używanie wielu odwołań do pliku „{0}.dll” jest niedozwolone</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Nie można odczytać zestawu „{0}”</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.pt-BR.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">A configuração de privacidade '{0}' não foi reconhecida pelo recurso gerenciado, as opções válidas são 'public' e 'private'</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">As referências múltiplas '{0}.dll' não são permitidas</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Não é possível ler o assembly '{0}'</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.ru.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Нераспознанный параметр конфиденциальности "{0}" для управляемого ресурса. Допускается использование параметров "public" и "private"</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Множественные ссылки на файлы "{0}.dll" не допускаются</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">Не удается прочитать сборку "{0}"</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.tr.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">Yönetilen kaynak için tanınmayan gizlilik ayarı '{0}'; geçerli seçenekler: 'public' ve 'private'</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">Birden çok '{0}.dll' başvurusuna izin verilmiyor</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">'{0}' bütünleştirilmiş kodu okunamıyor</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.zh-Hans.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">无法识别的受管理资源隐私设置“{0}”,有效的选项为 "public" 和 "private"</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">不允许多次引用“{0}.dll”</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">无法读取程序集“{0}”</target>
Expand Down
5 changes: 0 additions & 5 deletions src/fsharp/xlf/FSComp.txt.zh-Hant.xlf
Original file line number Diff line number Diff line change
Expand Up @@ -267,11 +267,6 @@
<target state="translated">受控資源的無法辨識隱私設定 '{0}',有效的選項是 'public' 和 'private'</target>
<note />
</trans-unit>
<trans-unit id="buildMultipleReferencesNotAllowed">
<source>Multiple references to '{0}.dll' are not permitted</source>
<target state="translated">不允許多次參考 '{0}.dll'</target>
<note />
</trans-unit>
<trans-unit id="buildCannotReadAssembly">
<source>Unable to read assembly '{0}'</source>
<target state="translated">無法讀取組件 '{0}'</target>
Expand Down

0 comments on commit b834b12

Please sign in to comment.