-
Notifications
You must be signed in to change notification settings - Fork 586
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
FAKE template domain specific language choice #2177
FAKE template domain specific language choice #2177
Conversation
Nice 😉 I would prefer |
@vbfox I guess you mean |
Only thing is that we could add a test for this flag (we already have some tests for the template so it should be reasonably easy to add another one), let me know if you need help. |
@matthid yes 😄 |
@vbfox I think buildtask is a bit too generic, but I also can't find a better name. Maybe blackfox might not be that bad, because it gives credit to the author ;) |
The names "proposed" in the original issue were "pipelines" and "target groups". I would change it to buildtask though just because the api is named that way. |
We will see how it works it's more or less an experiment in how external modules might work (and if we can move more outside this repository) we will see how it works. We already have seen issues regarding issues with the level of binary compatibility we provide. So we might come to the conclusion that external modules are not too viable and prefer to have the code here (which I don't hope). I'm pretty sure if we can come up with a good name we can still change it including the module name (if @vbfox agrees) but we shouldn't change it every version. It is indeed a bit strange to call "targets" "tasks", or is it? |
Also It's not only "build" but also deploy and every other kind of automation ;) |
Adds link to dsl documentation in template help Adds template tests for dsl and dependencies choices
I think it can be done especially with FAKE 5, the central API surface is quite small and easier to version. I hope it lead to FAKE packages being versionned separately with a highly compatible core and packages around it that experiment more freely. Some things like the Record compatibility problems could even be suggested as enhancements to the F# language as it's an especially annoying point of F# APIs
No problem changing it but it already changed a few times :
|
Indeed that's what I was thinking about. This is really unfortunate and not something we are able to handle at the moment Sadly, it's the most used feature throughout all the modules, maybe with the exception of the target module. Maybe the record stuff can be solved but there are similar limitations with DUs and I don't think they are solvable by F#. In fact I doubt a lot of people can write code which we would consider 'forward compatible' ;) Regarding naming, have you tried calling your module 'Target' and hiding existing members (people can still access stuff via fully qualified names?) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@vbfox Maybe like this?
Specifies your prefered way to define build tasks inside your build script: | ||
|
||
- `fake` (default) - Uses the default FAKE domain specific language | ||
- `blackfox` - Uses the BlackFox domain specific language |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
- `blackfox` - Uses the BlackFox domain specific language | |
- `buildtask` - Uses a string free domain specific language, called [BuildTask](https://github.com/vbfox/FoxSharp/blob/master/src/BlackFox.Fake.BuildTask/Readme.md) |
"description": "Uses the default FAKE domain specific language (see https://fake.build/core-targets.html)" | ||
}, | ||
{ | ||
"choice": "blackfox", |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"choice": "blackfox", | |
"choice": "buildtask", |
}, | ||
{ | ||
"choice": "blackfox", | ||
"description": "Uses the BlackFox domain specific language (see https://github.com/vbfox/FoxSharp/blob/master/src/BlackFox.Fake.BuildTask/Readme.md)" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
"description": "Uses the BlackFox domain specific language (see https://github.com/vbfox/FoxSharp/blob/master/src/BlackFox.Fake.BuildTask/Readme.md)" | |
"description": "Uses a string free domain specific language, called [BuildTask](https://github.com/vbfox/FoxSharp/blob/master/src/BlackFox.Fake.BuildTask/Readme.md)" |
nuget Fake.Core.Target | ||
//#if (dsl == "blackfox") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
//#if (dsl == "blackfox") | |
//#if (dsl == "buildtask") |
type DslKind = | ||
| Fake | ||
| BlackFox | ||
with override x.ToString () = match x with | Fake -> "fake" | BlackFox -> "blackfox" |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
with override x.ToString () = match x with | Fake -> "fake" | BlackFox -> "blackfox" | |
with override x.ToString () = match x with | Fake -> "fake" | BlackFox -> "buildtask" |
I'm not a fan of hiding stuff or depending on |
Just of the top of my head, for discussion purposes:
|
Afaics the implementation is not particularly related to pipelines or groups it's more accidental that it solves the same problem in a nice way. But in the end you define classical "targets" and their dependencies under the hood. You can even mix the two. However, I feel like just calling them "Tasks" and marketing them as the new way of doing this would be fine by me as well. Even after @vbfox I still like just 'Target' and 'TargetEx' or 'Task' from @kblohm. Additionally I'd suggest 'StrongTarget' or 'TypedTarget', 'QuickTarget' or 'BTarget' (better target or blackfox target, beta target for being second) Yes we could also not hide but only extend the Target module, like 'createTyped' instead of just 'create' for example. |
In the end I'd like to get something out and not wait too long on naming, as the module is external we can change naming, add a new module and not break anyone |
I like the idea of calling it task instead of buildtask. I'm updating the PR later so we might be able to close it for now. |
I like task, and would have kept it as a name if it didn't collision with a well known framework type and computation expression |
Description
Adds an additional choice to the FAKE template to specify the used domain specific language. At the moment this is either the default FAKE DSL or the BlackFox DSL.