diff --git a/implement/Pine.Core/Pine.Core.csproj b/implement/Pine.Core/Pine.Core.csproj
index 5e0279c8..4eb28ed3 100644
--- a/implement/Pine.Core/Pine.Core.csproj
+++ b/implement/Pine.Core/Pine.Core.csproj
@@ -3,13 +3,13 @@
net8.0
enable
- 0.3.4
- 0.3.4
+ 0.3.5
+ 0.3.5
Pine.Core
- 0.3.4
+ 0.3.5
The cross-platform Elm runtime environment
Functional;Elm;Runtime;Compiler;VM;DBMS
https://github.com/pine-vm/pine.git
diff --git a/implement/pine/Elm019/ElmJsonStructure.cs b/implement/pine/Elm019/ElmJsonStructure.cs
index b5251512..99562935 100644
--- a/implement/pine/Elm019/ElmJsonStructure.cs
+++ b/implement/pine/Elm019/ElmJsonStructure.cs
@@ -16,14 +16,14 @@ public static RelativeDirectory ParseSourceDirectory(string sourceDirectory)
{
var initialRecord = new RelativeDirectory(ParentLevel: 0, Subdirectories: []);
- if (sourceDirectory == ".")
- return initialRecord;
-
sourceDirectory = sourceDirectory.Replace('\\', '/');
sourceDirectory = sourceDirectory.StartsWith("./") ? sourceDirectory[2..] : sourceDirectory;
- var segmentsStrings = sourceDirectory.Split('/');
+ var segmentsStrings =
+ sourceDirectory
+ .Split('/')
+ .SkipWhile(segment => segment is "");
return
segmentsStrings
@@ -43,6 +43,10 @@ aggregate with
{
ParentLevel = aggregate.ParentLevel + 1
},
+
+ "." =>
+ aggregate,
+
_ =>
aggregate with
{
diff --git a/implement/pine/ElmTime/compile-elm-program/src/CompileElmApp.elm b/implement/pine/ElmTime/compile-elm-program/src/CompileElmApp.elm
index eb2f5fa6..b81d553d 100644
--- a/implement/pine/ElmTime/compile-elm-program/src/CompileElmApp.elm
+++ b/implement/pine/ElmTime/compile-elm-program/src/CompileElmApp.elm
@@ -525,6 +525,7 @@ parseElmJsonSourceDirectoryPath pathInJson =
let
pathItems =
String.split "/" pathInJson
+ |> List.Extra.dropWhile String.isEmpty
in
List.foldl
(\nextSegment { parentLevel, subdirectories } ->
diff --git a/implement/pine/ElmTime/compile-elm-program/tests/CompileElmAppTests.elm b/implement/pine/ElmTime/compile-elm-program/tests/CompileElmAppTests.elm
index 7e11c70f..b3805acc 100644
--- a/implement/pine/ElmTime/compile-elm-program/tests/CompileElmAppTests.elm
+++ b/implement/pine/ElmTime/compile-elm-program/tests/CompileElmAppTests.elm
@@ -1182,6 +1182,51 @@ find_source_directories =
}
]
}
+ , { testName = "root as source directory"
+ , compilationRootFilePath = [ "Main.elm" ]
+ , sourceFiles =
+ Dict.fromList
+ [ ( [ "elm.json" ]
+ , """
+{
+ "type": "application",
+ "source-directories": [
+ ""
+ ],
+ "elm-version": "0.19.1",
+ "dependencies": {
+ "direct": {
+ "elm/browser": "1.0.2",
+ "elm/core": "1.0.5",
+ "elm/html": "1.0.0"
+ },
+ "indirect": {
+ "elm/json": "1.1.3",
+ "elm/time": "1.0.0",
+ "elm/url": "1.0.0",
+ "elm/virtual-dom": "1.0.3"
+ }
+ },
+ "test-dependencies": {
+ "direct": {},
+ "indirect": {}
+ }
+}
+
+ """
+ )
+ ]
+ , expectedSourceDirectories =
+ { mainSourceDirectoryPath = []
+ , elmJsonDirectoryPath = []
+ , secondarySourceDirectories = []
+ }
+ , moduleNameFromFileNameTests =
+ [ { fileName = [ "Main.elm" ]
+ , expectedModuleName = Just [ "Main" ]
+ }
+ ]
+ }
]
|> List.map
(\testCase ->
diff --git a/implement/pine/Program.cs b/implement/pine/Program.cs
index d1dc2eaf..25080736 100644
--- a/implement/pine/Program.cs
+++ b/implement/pine/Program.cs
@@ -18,7 +18,7 @@ namespace ElmTime;
public class Program
{
- public static string AppVersionId => "0.3.4";
+ public static string AppVersionId => "0.3.5";
private static int AdminInterfaceDefaultPort => 4000;
diff --git a/implement/pine/pine.csproj b/implement/pine/pine.csproj
index da8d1508..b73356e3 100644
--- a/implement/pine/pine.csproj
+++ b/implement/pine/pine.csproj
@@ -4,8 +4,8 @@
Exe
net8.0
pine
- 0.3.4
- 0.3.4
+ 0.3.5
+ 0.3.5
enable
true