Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
70 commits
Select commit Hold shift + click to select a range
0030512
various refactorings:
adamralph Feb 5, 2015
6ce2695
Merge pull request #916 from adamralph/914-active-review
khellang Feb 5, 2015
7e2983f
red: change ObjectSerializerTests to expect no $id and $ref unless th…
adamralph Feb 5, 2015
1e48d7a
green: changed ObjectSerializer to remove $id and $ref unless there i…
adamralph Feb 5, 2015
b3130bd
refactor: change remaining ObjectSerializerTests to 3A's
adamralph Feb 6, 2015
a319850
Merge pull request #920 from adamralph/700
glennblock Feb 7, 2015
8770146
Merge pull request #925 from scriptcs/master
adamralph Feb 7, 2015
8f3bc1b
refactor: simplify conditional, fix whitespace, remove and sort usings
adamralph Feb 7, 2015
ddca0e7
green: add scenario Packages.PackageContainsAFrameworkAssemblyReference
adamralph Feb 7, 2015
1c546d9
red: revert 923 AssemblyUtility changes
adamralph Feb 7, 2015
759560a
green: implement scenario Packages.PackageContainsAFrameworkAssemblyR…
adamralph Feb 7, 2015
d4c0cf9
refactor: AssemblyResolver and PackageAssemblyResolver internals
adamralph Feb 7, 2015
c6fa3c8
Merge pull request #926 from adamralph/923-refactoring
khellang Feb 10, 2015
5c6f91b
Better greeting message
Feb 11, 2015
8845fe6
Merge pull request #932 from radiy/dev
filipw Feb 11, 2015
01a5ad4
Adding Paul Bouwer
glennblock Feb 24, 2015
ed02ecf
Merge pull request #938 from scriptcs/master
adamralph Feb 24, 2015
c0a234b
Introduces the ability to author script packs in script and package t…
glennblock Feb 9, 2015
8487523
Moves package script composition to runtime. Changes entry script to …
glennblock Feb 23, 2015
309ab77
Rename refactoring from PackageScript to ScriptLibrary
glennblock Feb 25, 2015
a6aa72d
Adding debug and trace level logging. Adding deleting the ScriptLibra…
glennblock Feb 25, 2015
f0a5af4
More renaming
glennblock Feb 25, 2015
8653606
Applying CR feedback. Adding warning if 2 Main files exist. ACTUALLY …
glennblock Feb 28, 2015
cfddb58
Fixing logic to work with non-rooted scripts. Adding REPL support
glennblock Feb 28, 2015
50783ec
Fixes #785
mbaker-dev Aug 26, 2014
18e6dbe
change binary artifacts folder to Release/bin for *nix
adamralph Mar 3, 2015
8088e2d
Merge pull request #946 from adamralph/785
khellang Mar 3, 2015
968a9eb
Adding ScriptCs.Contracts reference. Fixing Composer to append Script…
glennblock Mar 3, 2015
4f45fbe
Adds warning if package cannot be found
glennblock Mar 3, 2015
35523e7
Fixing Script Library REPL test, also adding acceptance test accessin…
glennblock Mar 3, 2015
d405cdf
Removing braces
glennblock Mar 3, 2015
836cbc7
Adding PackageId to logging
glennblock Mar 4, 2015
c719bf5
ensure ScriptExecutor does not allow adding of duplicate references a…
adamralph Mar 4, 2015
c533a38
refactor: switch to travis csharp docker container
adamralph Mar 4, 2015
94876b2
Changing calculations to equal 42, because that is the right thing to…
glennblock Mar 4, 2015
47a43de
Fixing test text
glennblock Mar 4, 2015
69f0dda
Merge pull request #950 from adamralph/949
glennblock Mar 4, 2015
af885ff
Merge pull request #928 from glennblock/909
adamralph Mar 4, 2015
f5a886f
bump version number to 0.14.0
adamralph Mar 4, 2015
9457a09
red: add PackagesWithDuplicateAssemblies scenario
adamralph Mar 5, 2015
61a8475
green: implemented PackagesWithDuplicateAssemblies scenario
adamralph Mar 5, 2015
be47835
refactor: cleaned up AssemblyReferences members
adamralph Mar 5, 2015
1bff619
refactor: take advantage of AssemblyReferences immutability
adamralph Mar 5, 2015
7608259
refactor: redundant code and whitespace
adamralph Mar 5, 2015
d326b48
Merge pull request #954 from adamralph/953
khellang Mar 5, 2015
23449d5
Merge pull request #951 from adamralph/947
khellang Mar 5, 2015
919fdab
Added new exit REPL command
seandgrimes Aug 20, 2014
1c2b7a6
Fix broken ExitCommand unit test
seandgrimes Aug 23, 2014
394d62e
fixed duplicate IREPL following rebase
filipw Mar 6, 2015
80001a9
added missing description
filipw Mar 6, 2015
fd99e2c
applied my own feedback
filipw Mar 6, 2015
3a7624f
Merge pull request #959 from filipw/feature/427
khellang Mar 6, 2015
59a279f
use reflection instead of MEF if we only need CSharp module
filipw Mar 7, 2015
af0a00d
loader clean up
filipw Mar 7, 2015
b2ad97d
added tests
filipw Mar 7, 2015
563147e
fixed travis build
filipw Mar 7, 2015
e5d42bd
Merge pull request #965 from filipw/bugfix/964
adamralph Mar 7, 2015
4fab22f
Ignore shebang on *nix platforms #956
mbaker-dev Mar 13, 2015
119acb0
Binstub for *nix #675
mbaker-dev Mar 13, 2015
5aa8b4e
Tidying up location of binstub.
mbaker-dev Mar 17, 2015
ebcfa49
Merge pull request #970 from mbaker-dev/675
adamralph Mar 17, 2015
7981050
fix nightly package dependencies
adamralph Mar 21, 2015
4923313
Merge pull request #979 from adamralph/978
filipw Mar 21, 2015
b8964f4
only use fast path when extension is CSX or none
filipw Mar 21, 2015
8814436
added tests
filipw Mar 21, 2015
9e7b063
ignore case when comparing extension
filipw Mar 21, 2015
d238444
Merge pull request #980 from filipw/bugfix/964
adamralph Mar 21, 2015
85775d5
reverted breaking change to ScriptExector by restoring constructor ov…
adamralph Mar 22, 2015
9a7ccd4
refactor: guards, redundant code, whitespace, variable declaration cl…
adamralph Mar 22, 2015
a421db9
Merge pull request #981 from adamralph/909
glennblock Mar 22, 2015
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
17 changes: 3 additions & 14 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,21 +1,10 @@
language: c

before_install:
- sudo bash -c "echo deb http://badgerports.org precise main >> /etc/apt/sources.list"
- sudo apt-key adv --keyserver keyserver.ubuntu.com --recv-keys 0E1FAD0C
- sudo apt-get update -qq
- sudo apt-get install -qq mono-devel
sudo: false
language: csharp

install:
- mozroots --import --sync --quiet
- mono ./.nuget/NuGet.exe restore ./ScriptCs.sln
- nuget restore ./ScriptCs.sln

script:
- mkdir artifacts --parents
- xbuild ./ScriptCs.sln /property:Configuration=Release /nologo /verbosity:normal
- mono ./packages/xunit.runners.1.9.2/tools/xunit.console.clr4.exe test/ScriptCs.Tests.Acceptance/bin/Release/ScriptCs.Tests.Acceptance.dll /xml artifacts/ScriptCs.Tests.Acceptance.dll.TestResult.xml /html artifacts/ScriptCs.Tests.Acceptance.dll.TestResult.html

notifications:
email:
- adam@adamralph.com

5 changes: 4 additions & 1 deletion ScriptCs.sln
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@

Microsoft Visual Studio Solution File, Format Version 12.00
# Visual Studio 2013
VisualStudioVersion = 12.0.30501.0
VisualStudioVersion = 12.0.31101.0
MinimumVisualStudioVersion = 10.0.40219.1
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptCs", "src\ScriptCs\ScriptCs.csproj", "{25080671-1A80-4041-B9C7-260578FF4849}"
EndProject
Expand Down Expand Up @@ -37,6 +37,9 @@ EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptCs.Engine.Mono.Tests", "test\ScriptCs.Engine.Mono.Tests\ScriptCs.Engine.Mono.Tests.csproj", "{D0723C2D-D3B4-40B7-8E5A-84FB3A6E5092}"
EndProject
Project("{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC}") = "ScriptCs.Tests.Acceptance", "test\ScriptCs.Tests.Acceptance\ScriptCs.Tests.Acceptance.csproj", "{10684649-2922-41F5-AB9B-20B127CBF92C}"
ProjectSection(ProjectDependencies) = postProject
{25080671-1A80-4041-B9C7-260578FF4849} = {25080671-1A80-4041-B9C7-260578FF4849}
EndProjectSection
EndProject
Project("{2150E333-8FDC-42A3-9474-1A3956D46DE8}") = ".nuget", ".nuget", "{B138045D-DC04-4A04-A2BA-F771173BCC32}"
ProjectSection(SolutionItems) = preProject
Expand Down
2 changes: 2 additions & 0 deletions ScriptCs.sln.DotSettings
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
<wpf:ResourceDictionary xml:space="preserve" xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml" xmlns:s="clr-namespace:System;assembly=mscorlib" xmlns:ss="urn:shemas-jetbrains-com:settings-storage-xaml" xmlns:wpf="http://schemas.microsoft.com/winfx/2006/xaml/presentation">
<s:String x:Key="/Default/CodeStyle/Naming/CSharpNaming/PredefinedNamingRules/=PrivateInstanceFields/@EntryIndexedValue">&lt;Policy Inspect="True" Prefix="_" Suffix="" Style="aaBb" /&gt;</s:String></wpf:ResourceDictionary>
3 changes: 2 additions & 1 deletion build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,8 @@ mozroots --import --sync --quiet
mono ./.nuget/NuGet.exe restore ./ScriptCs.sln

# script
mkdir -p artifacts
mkdir -p artifacts/Release/bin
xbuild ./ScriptCs.sln /property:Configuration=Release /nologo /verbosity:normal
cp src/*/bin/Release/* artifacts/Release/bin/
mono ./packages/xunit.runners.1.9.2/tools/xunit.console.clr4.exe test/ScriptCs.Tests.Acceptance/bin/Release/ScriptCs.Tests.Acceptance.dll /xml artifacts/ScriptCs.Tests.Acceptance.dll.TestResult.xml /html artifacts/ScriptCs.Tests.Acceptance.dll.TestResult.html

6 changes: 3 additions & 3 deletions build/ScriptCs.Version.props
Original file line number Diff line number Diff line change
Expand Up @@ -4,8 +4,8 @@
<!-- Use the properties below to control the version of the assemblies created. -->
<PropertyGroup>
<MajorVersion>0</MajorVersion>
<MinorVersion>13</MinorVersion>
<PatchVersion>3</PatchVersion>
<MinorVersion>14</MinorVersion>
<PatchVersion>0</PatchVersion>

<!-- Change this to set the build quality of the project. Use values like "alpha", "beta", "rc1", "rtm", etc. -->
<!-- These values are used in SemVer, so make sure to always increase these alphabetically. -->
Expand All @@ -17,9 +17,9 @@
<AssemblyVersion>$(MajorVersion).$(MinorVersion).0</AssemblyVersion>
<AssemblyInformationalVersion>$(MajorVersion).$(MinorVersion).$(PatchVersion)</AssemblyInformationalVersion>
<AssemblyInformationalVersion Condition=" '$(BuildQuality)' != '' ">$(AssemblyInformationalVersion)-$(BuildQuality)</AssemblyInformationalVersion>
<AssemblyInformationalVersion Condition=" '$(IsNightlyBuild)' != '' ">$(AssemblyInformationalVersion)-nightly-$([System.DateTime]::UtcNow.ToString("yyMMdd"))</AssemblyInformationalVersion>

<PackageVersion>$(AssemblyInformationalVersion)</PackageVersion>
<PackageVersion Condition=" '$(IsNightlyBuild)' != '' ">$(PackageVersion)-nightly-$([System.DateTime]::UtcNow.ToString("yyMMdd"))</PackageVersion>
</PropertyGroup>

<ItemGroup>
Expand Down
113 changes: 94 additions & 19 deletions src/ScriptCs.Contracts/AssemblyReferences.cs
Original file line number Diff line number Diff line change
@@ -1,41 +1,116 @@
using System.Collections.Generic;
using System.Linq;
using System.Reflection;

namespace ScriptCs.Contracts
namespace ScriptCs.Contracts
{
using System.Collections.Generic;
using System.Linq;
using System.Reflection;
using System;
using System.IO;

public class AssemblyReferences
{
private readonly Dictionary<string, Assembly> _assemblies = new Dictionary<string, Assembly>();
private readonly Dictionary<string, string> _paths = new Dictionary<string, string>();

public AssemblyReferences()
: this(Enumerable.Empty<string>(), Enumerable.Empty<Assembly>())
: this(Enumerable.Empty<string>())
{
}

public AssemblyReferences(IEnumerable<Assembly> assemblies)
: this(assemblies, Enumerable.Empty<string>())
{
}

public AssemblyReferences(IEnumerable<string> paths)
: this(Enumerable.Empty<Assembly>(), paths)
{
}

public AssemblyReferences(IEnumerable<string> pathReferences, IEnumerable<Assembly> assemblies)
public AssemblyReferences(IEnumerable<Assembly> assemblies, IEnumerable<string> paths)
{
Guard.AgainstNullArgument("pathReferences", pathReferences);
Guard.AgainstNullArgument("paths", paths);
Guard.AgainstNullArgument("assemblies", assemblies);

PathReferences = new HashSet<string>(pathReferences);
Assemblies = new HashSet<Assembly>(assemblies);
foreach (var assembly in assemblies.Where(assembly => assembly != null))
{
var name = assembly.GetName().Name;
if (!_assemblies.ContainsKey(name))
{
_assemblies.Add(name, assembly);
}
}

foreach (var path in paths)
{
var name = Path.GetFileName(path);
if (name == null)
{
continue;
}

if (name.EndsWith(".dll", StringComparison.OrdinalIgnoreCase) ||
name.EndsWith(".exe", StringComparison.OrdinalIgnoreCase))
{
name = Path.GetFileNameWithoutExtension(name);
}

if (!_paths.ContainsKey(name) && !_assemblies.ContainsKey(name))
{
_paths.Add(name, path);
}
}
}

public HashSet<string> PathReferences { get; private set; }
public HashSet<Assembly> Assemblies { get; private set; }
public IEnumerable<Assembly> Assemblies
{
get { return _assemblies.Values.ToArray(); }
}

public AssemblyReferences Except(AssemblyReferences obj)
public IEnumerable<string> Paths
{
Guard.AgainstNullArgument("obj", obj);
get { return _paths.Values.ToArray(); }
}

public AssemblyReferences Union(AssemblyReferences references)
{
Guard.AgainstNullArgument("references", references);

return new AssemblyReferences(Assemblies.Union(references.Assemblies), Paths.Union(references.Paths));
}

public AssemblyReferences Union(IEnumerable<Assembly> assemblies)
{
Guard.AgainstNullArgument("assemblies", assemblies);

return new AssemblyReferences(Assemblies.Union(assemblies), Paths);
}

public AssemblyReferences Union(IEnumerable<string> paths)
{
Guard.AgainstNullArgument("paths", paths);

return new AssemblyReferences(Assemblies, Paths.Union(paths));
}

public AssemblyReferences Except(AssemblyReferences references)
{
Guard.AgainstNullArgument("references", references);

return new AssemblyReferences(Assemblies.Except(references.Assemblies), Paths.Except(references.Paths));
}

public AssemblyReferences Except(IEnumerable<Assembly> assemblies)
{
Guard.AgainstNullArgument("assemblies", assemblies);

return new AssemblyReferences(PathReferences.Except(obj.PathReferences), Assemblies.Except(obj.Assemblies));
return new AssemblyReferences(Assemblies.Except(assemblies), Paths);
}

public void Union(AssemblyReferences obj)
public AssemblyReferences Except(IEnumerable<string> paths)
{
Guard.AgainstNullArgument("obj", obj);
Guard.AgainstNullArgument("paths", paths);

PathReferences.UnionWith(obj.PathReferences);
Assemblies.UnionWith(obj.Assemblies);
return new AssemblyReferences(Assemblies, Paths.Except(paths));
}
}
}
1 change: 0 additions & 1 deletion src/ScriptCs.Contracts/IAppDomainAssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,6 @@ namespace ScriptCs.Contracts
{
public interface IAppDomainAssemblyResolver
{
void AddAssemblyPaths(IEnumerable<string> assemblyPaths);
void Initialize();
}
}
4 changes: 3 additions & 1 deletion src/ScriptCs.Contracts/IPackageObject.cs
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,8 @@ public interface IPackageObject

IEnumerable<IPackageObject> Dependencies { get; }

IEnumerable<string> FrameworkAssemblies { get; }
IEnumerable<string> FrameworkAssemblies { get; }

IEnumerable<string> GetContentFiles();
}
}
13 changes: 13 additions & 0 deletions src/ScriptCs.Contracts/IScriptEnvironment.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace ScriptCs.Contracts
{
public interface IScriptEnvironment
{
IReadOnlyList<string> ScriptArgs { get; }
}
}
1 change: 1 addition & 0 deletions src/ScriptCs.Contracts/IScriptHost.cs
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,6 @@ namespace ScriptCs.Contracts
public interface IScriptHost
{
T Require<T>() where T : IScriptPackContext;
IScriptEnvironment Env { get; }
}
}
11 changes: 11 additions & 0 deletions src/ScriptCs.Contracts/IScriptLibraryComposer.cs
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
using System.Text;

namespace ScriptCs.Contracts
{
public interface IScriptLibraryComposer
{
void Compose(string workingDirectory, StringBuilder builder = null);

string ScriptLibrariesFile { get; }
}
}
4 changes: 3 additions & 1 deletion src/ScriptCs.Contracts/ScriptCs.Contracts.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -74,10 +74,12 @@
<Compile Include="IPackageInstaller.cs" />
<Compile Include="IPackageObject.cs" />
<Compile Include="IPackageReference.cs" />
<Compile Include="IRepl.cs" />
<Compile Include="IScriptEnvironment.cs" />
<Compile Include="IScriptLibraryComposer.cs" />
<Compile Include="IReplCommand.cs" />
<Compile Include="IReplEngine.cs" />
<Compile Include="IScriptEngine.cs" />
<Compile Include="IRepl.cs" />
<Compile Include="IScriptExecutor.cs" />
<Compile Include="IScriptHost.cs" />
<Compile Include="IScriptHostFactory.cs" />
Expand Down
2 changes: 1 addition & 1 deletion src/ScriptCs.Core/AppDomainAssemblyResolver.cs
Original file line number Diff line number Diff line change
Expand Up @@ -13,7 +13,7 @@ public class AppDomainAssemblyResolver : IAppDomainAssemblyResolver
private readonly IFileSystem _fileSystem;
private readonly IAssemblyResolver _resolver;
private readonly IAssemblyUtility _assemblyUtility;
private IDictionary<string, AssemblyInfo> _assemblyInfoMap;
private readonly IDictionary<string, AssemblyInfo> _assemblyInfoMap;

public AppDomainAssemblyResolver(
ILog logger,
Expand Down
Loading