Skip to content

Commit

Permalink
Fix compilation root entry point for entry point in declaration 'main'
Browse files Browse the repository at this point in the history
In the previous version, the 'make' command would fail with an error message like the following:
-----
Failed to make src/Frontend/Main.elm:
Failed to get entry point main declaration: Found no declaration of an entry point. I only support the following 2 names for entry points declarations: backendMain, blobMain
  • Loading branch information
Viir committed Jan 31, 2023
1 parent 4ece5af commit 565757e
Show file tree
Hide file tree
Showing 3 changed files with 16 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -385,6 +385,7 @@ loweredForCompilationRoot config sourceFiles =

Just ( compilationRootModuleName, ( _, compilationRootModuleSyntax ) ) ->
let
entryPointTypes : List ( String, AppFiles -> Result (List (LocatedInSourceFiles CompilationError)) { compiledFiles : AppFiles, rootModuleEntryPointKind : Result error ElmMakeEntryPointKind } )
entryPointTypes =
[ ( "backendMain"
, loweredForBackendApp config
Expand All @@ -407,6 +408,18 @@ loweredForCompilationRoot config sourceFiles =
}
)
)
, ( "main"
, \compiledFiles ->
Ok
{ compiledFiles = compiledFiles
, rootModuleEntryPointKind =
Ok
(ClassicMakeEntryPoint
{ elmMakeJavaScriptFunctionName = compilationRootModuleName ++ ".main"
}
)
}
)
]

declarationsNames =
Expand Down
2 changes: 1 addition & 1 deletion implement/elm-fullstack/Program.cs
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@ namespace ElmFullstack;

public class Program
{
static public string AppVersionId => "2023-01-30";
static public string AppVersionId => "2023-01-31";

static int AdminInterfaceDefaultPort => 4000;

Expand Down
4 changes: 2 additions & 2 deletions implement/elm-fullstack/elm-fullstack.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@
<TargetFramework>net7.0</TargetFramework>
<RootNamespace>ElmFullstack</RootNamespace>
<AssemblyName>elm-fs</AssemblyName>
<AssemblyVersion>2023.0130.0.0</AssemblyVersion>
<FileVersion>2023.0130.0.0</FileVersion>
<AssemblyVersion>2023.0131.0.0</AssemblyVersion>
<FileVersion>2023.0131.0.0</FileVersion>
<Nullable>enable</Nullable>
<GenerateEmbeddedFilesManifest>true</GenerateEmbeddedFilesManifest>
</PropertyGroup>
Expand Down

0 comments on commit 565757e

Please sign in to comment.