Skip to content

Commit 69feaca

Browse files
committed
Added a comment on default usings
1 parent bde2658 commit 69feaca

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

src/Dotnet.Script.Core/ScriptCompiler.cs

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -39,6 +39,7 @@ static ScriptCompiler()
3939
});
4040
}
4141

42+
//Note: We should set this according to the SDK being used
4243
protected virtual IEnumerable<string> ImportedNamespaces => new[]
4344
{
4445
"System",
@@ -94,7 +95,7 @@ public virtual ScriptOptions CreateScriptOptions(ScriptContext context, IList<Ru
9495
{
9596
var scriptMap = runtimeDependencies.ToDictionary(rdt => rdt.Name, rdt => rdt.Scripts);
9697
var opts = ScriptOptions.Default.AddImports(ImportedNamespaces)
97-
.WithSourceResolver(new NuGetSourceReferenceResolver(new SourceFileResolver(ImmutableArray<string>.Empty, context.WorkingDirectory),scriptMap))
98+
.WithSourceResolver(new NuGetSourceReferenceResolver(new SourceFileResolver(ImmutableArray<string>.Empty, context.WorkingDirectory), scriptMap))
9899
.WithMetadataResolver(new NuGetMetadataReferenceResolver(ScriptMetadataResolver.Default.WithBaseDirectory(context.WorkingDirectory)))
99100
.WithEmitDebugInformation(true)
100101
.WithLanguageVersion(LanguageVersion.Preview)
@@ -200,7 +201,7 @@ AssemblyLoadContext is not ScriptAssemblyLoadContext salc ||
200201
Assembly loadedAssembly = null;
201202
if (homogenization)
202203
loadedAssembliesMap.TryGetValue(runtimeAssembly.Name.Name, out loadedAssembly);
203-
204+
204205
if (loadedAssembly == null)
205206
{
206207
_logger.Trace("Adding reference to a runtime dependency => " + runtimeAssembly);
@@ -290,7 +291,7 @@ private Assembly MapUnresolvedAssemblyToRuntimeLibrary(IDictionary<string, Runti
290291
if (assemblyName.Version == null || runtimeAssembly.Name.Version > assemblyName.Version)
291292
{
292293
loadedAssemblyMap.TryGetValue(assemblyName.Name, out var loadedAssembly);
293-
if(loadedAssembly != null)
294+
if (loadedAssembly != null)
294295
{
295296
_logger.Trace($"Redirecting {assemblyName} to already loaded {loadedAssembly.GetName().Name}");
296297
return loadedAssembly;

0 commit comments

Comments
 (0)