Open alfonsogarciacaro opened 8 years ago
I don't think author should be included
The <name>
<assemblyname>
and <rootnamespace>
properties can all be filled using the filename
myproject1.fstoml
generates myproject1.fsproj
I think we should start with
Dll references
This is bit... more complex.
There are at least 3 important types of references in MsBuild:
System.Xml
)I guess we could also add Package references (just saying Newtonsoft.Json
) which would be resolved internally by Paket
Author (optional)
I would go with Author (preferably list of Authors), would also add optional git repository link... but it's not something super important to be fair.
I'd also think about adding description, project version etc - we could generate not only fsproj but also AssemblyConfig.fs
[and maybe one day we won't need those ;) ]
@Krzysztof-Cieslak i'm not talking about <ProjectReference>
, only GAC and relative path <Reference>
We don't have to worry about adding package references to the fstoml file initially. We can just use paket the same way we normally would. We just need to generate the fsproj and then run paket install
on a fresh clone.
We don't have to worry about adding package references to the fstoml file initially. We can just use paket the same way we normally would. We just need to generate the fsproj and then run paket install on a fresh clone.
Too be honest it sounds like half-baked solution, don't see any reason to skip it out for now - we can simply depend on Paket.Core library and resolve those references without running additional paket install
I wasn't saying that should be the ultimate goal for handling package references, we're talking about the bare minimum to get it running.
Unless you plan on implementing it yourself, don't expect to see it in the first version :stuck_out_tongue_winking_eye:
So something like this would work?
[info]
fstoml-version = "0.0.1"
fsharpcore-version = "4.1"
target = "library"
references = [
"node_modules/fable-core/Fable.Core.dll"
]
files = [
"File1.fs",
"File2.fs"
]
Questions:
fstoml version
go in a comment? (or special syntax like xml, dunno if there's something similar in toml)rough example
fstomlVersion = '0.0.1.0'
name = "project name"
assemblyName = "project name"
rootNamespace = "project name"
projectGuid = "bb0c6f01-5e57-4575-a498-5de850d9fa6c"
outputType = "Library"
FSharpCore = "4.4.0.0"
TargetFramework = "netcore-1.6"
Files = [
{ None = "paket.references" },
{ Compile = "src/file.fs" },
{ Compile = "src/file2.fs", Link = "src/uselessLink.fs" },
{ Compile = "src/file3.fs", Sig = "src/file3.fsi" },
{ None = "src/script.fsx", Private = true },
]
References = [
{ Include = "System" },
{ Include = "FSharp.Core" },
{ Include = "Fable.Core" },
]
ProjectReferences = [
{ Name = Arg, Project = "f3d0b372-3af7-49d9-98ed-5a78e9416098", Private = true }
]
[ Config ]
# keys defined in config apply to all descendents,
# but can be overwritten in nested tables
Tailcalls = true
WarningsAsErrors = true
[ Config.Debug ]
Constants = [ 'DEBUG', 'FABLE' ]
DebugSymbols = true
DebugType = 'full'
Optimize = false
NoWarn = [52, 40]
OtherFlags = [ '--warnon:1182' ]
[ Config.Debug.x86 ]
OutputPath = "bin/Debug/x86"
[ Config.Debug.x64 ]
OutputPath = "bin/Debug/x64"
[ Config.Release ]
Constants = [ 'RELEASE', 'FABLE' ]
DebugSymbols = false
DebugType = 'pdb'
Optimize = true
[ Config.Release.x86 ]
OutputPath = "bin/Release/x86"
[ Config.Release.x64 ]
OutputPath = "bin/Release/x64"
References = [
{ Include = "System" },
{ Include = "FSharp.Core" },
{ Include = "Fable.Core" },
]
do we need use Include = "stuff"
? I don't think there are other types of references, are there?
Also, as much of config as possible should have sane defaults, maybe something like:
Tailcalls = true
WarningsAsErrors = true
[ Config.Debug ]
Constants = [ 'DEBUG']
DebugSymbols = true
DebugType = 'full'
Optimize = false
[ Config.Debug.x86 ]
OutputPath = "bin/Debug/x86"
[ Config.Debug.x64 ]
OutputPath = "bin/Debug/x64"
[ Config.Release ]
Constants = [ 'RELEASE' ]
DebugSymbols = false
DebugType = 'pdb'
Optimize = true
[ Config.Release.x86 ]
OutputPath = "bin/Release/x86"
[ Config.Release.x64 ]
OutputPath = "bin/Release/x64"
This way we could really simplify file for most usages.
we do need the Include
, because there's also HintPath
CopyLocal
SpecificVersion
Name
(we probably won't use name)
I would like to use at least a simple form of substitution, %(platform)
, that'll simplify it even more
[Config]
OutputPath = "%(Configuration)/%(Platform)"
we do need the
Include
, because there's alsoHintPath
CopyLocal
SpecificVersion
Name
(we probably won't use name)
Right, forgot about that, my bad.
I'd like also to have the defaults. For Fable projects ideally it should be possible to to have configs with little more than the list of files and a couple of references.
yea there'll be defaults, just like there are with fsproj
We need a minimal spec to start working on. I guess it should include: