-
Notifications
You must be signed in to change notification settings - Fork 16
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
More configuration! (entry points, compilers, public etc) #18
Comments
What's the benefit do specifying the build artifact path btw? |
flexibility? Especially if your target is javascript |
Ok, but we'd still have to overtake that entire folder. Is that ok? |
yeah for bucklescript I guess it's not a single target. So yeah that's totally fine. The "target" key would just be a directory in that case I guess |
Slightly tweaking @jaredly's idea. I want to land something similar to the following in #27. "targets": {
// style 1
"bucklescript": {
"entries": [ "./src/client.re", "./src/server.re" ] ,
"flags": "whatever"
},
// style 2
"bucklescript": {
"entries": {
"my_client": "./src/client.re",
"my_server": "./src/server.re"
} ,
"flags": "whatever"
},
// style 3
"native": {
// no engine specified, defaults to ocamlc? or sth
"entry": "./src/main.re",
"flags": " whatever",
}, |
hmm I think that makes in more confusing. I think splitting it up by "input -> output" makes more sense than splitting it up by engine |
@jaredly Can you elaborate on why it's confusing? I am not clearly able to see it. |
Oh you want some part of code to be compiled by one compiler and other part by another compiler? |
for example, how do I specify that I want BS to compile two things separately to different destination directories? |
@jaredly Everything is flat for now. But in future you can do this with style 2 right: "entries": {
"client/index": "./src/client",
"server/index": "./src/server"
} |
sure. and if you want different flags for the different targets? |
Can this be an array so that it's not a pain to work with in YoJson? |
@jaredly Hmm. Totally valid point. The way rebel is built works right now supporting two different compilers in the same build is either hard or not possible. Same situation with two different compiler configurations. I didn't really think about this till now. @chenglou Is this what you had in mind? "targets": [
{
"entry": "./src/client",
"engine": "bucklescript",
"target": "client/index"
},
{
"entry": "./src/server",
"engine": "bucklescript"
"target": "server/index"
}
{
"entry": "./src/server",
"engine": "native"
}
] |
@vramana that array configuration looks good to me. Can jenga just kick off 2 separate build processes? Or maybe our |
I really don't want to manually list the files that need to be compiled, that would be back to Makefiles from my perspective. Here are a bunch of use cases that I've personally encountered so far:
That last proposal might hit all of those use cases. |
@bsansouci You never have to list all the files. You only need to specify the entry points and which compiler you want it to compiled by and the rest all will be handled by |
Is there any update on a way to add compiler args? It would be nice if there was even a very manual way to add extra args to specific files even (relative to their package root).
|
Yeah I think this should be pretty trivial to implement. In the case where you want to add extraFileCompileArgs regardless of the backend. I think keeping it under
|
Yeah, I like the As far as sticking |
If |
So we're using the
package.json
to put config, but what should we put there? There are some issues that I think fall under this:And other things that I'm looking for:
Rust's cargo is useful to look at
The text was updated successfully, but these errors were encountered: