Comments (4)
I think relying on the actual build flags to pass into the toolbox could be a little over coupled.
If we had something like this, we wouldn't need to worry about toolbox flags at all.
{
"dependencies": {
"all": {
"flags": ["-c", "release"]
},
"macOS": {
"brew": ["mysql"],
"link": ["/usr/local/lib"],
"include": ["/usr/local/include/mysql"],
"flags": ["-Xswiftc", "-DNOJSON"]
},
"linux": {
"apt": ["mysql-server", "libmysqlclient-dev"]
}
}
}
We could also have the toolbox automatically install the deps through brew or apt.
Also having at least "name" in there would be useful for creating a provider index later on.
{
"name": "MySQL Provider",
"dependencies": { ... }
}
from toolbox.
@tannernelson I thought about that, but there's 2 things that make me against specifying type of flag.
- Less expandable. What if I want custom config flags, or any other thing that a project might want that doesn't fall into these categories. This limits their ability to do customizable fun stuff that doesn't fit into one of these boxes.
- More work. While there's some slight character savings, I don't think it's worth it. We can have a simple array and pass it in direct w/o any extra effort/testing/support. This requires more testing, more updates, and more explanation to users over "insert flags here and be done with it".
from toolbox.
Okay here's what the MySQL Provider vapor.json
will look like:
{
"name": "MySQL Provider",
"flags": {
"run": {
"all": [
"--config:mysql.version=foo"
]
},
"build": {
"macOS": [
"-Xswiftc",
"-I/usr/local/include/mysql",
"-Xlinker",
"-L/usr/local/lib"
],
"linux": [
"-Xswiftc",
"-DNOJSON"
]
},
"test": {
"macOS": [
"-Xswiftc",
"-I/usr/local/include/mysql",
"-Xlinker",
"-L/usr/local/lib"
],
"linux": [
"-Xswiftc",
"-DNOJSON"
]
}
}
}
from toolbox.
I've just wanted to clear that up since this cost me a few hours.
For me macOS
wasn't the right key, it is just mac
then all the parameters work as described.
#181
from toolbox.
Related Issues (20)
- Entity Generation HOT 3
- macOS packaging should offer alternatives to HomeBrew HOT 4
- Compiling issue on Centos7 HOT 4
- vapor --version couldn't work correctly HOT 7
- `which` fails on macOS
- Running Docker Image Fails on `git clone` HOT 5
- `vapor run migrate` on macOS 13.0.1 fails HOT 2
- Clone
- `new` fails when `--output` is an existing directory HOT 2
- Support installation as Nix package HOT 3
- Digital ocean issue: Doesn't start app HOT 1
- Logs. HOT 2
- 'vapor new ProjectName --template github/url' does not set 'name:' in Package.swift HOT 3
- [18.7.4] Code does not compile using make. HOT 2
- Issue building the toolbox on Arch HOT 1
- Compilation fails on Ubuntu 22.04 HOT 11
- Allow cloning local templates HOT 2
- Failed to install with make install HOT 7
- Building from source hangs indefinitely HOT 2
- Stuck in cloning template when vapor new a project in a Linux Docker container HOT 4
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from toolbox.