Commit 9371318
committed
proto: Drop LinuxSpec (and work around 'linux' sensitivity)
With LinuxSpec, a parser will have to know ahead of time what sort of
config it's reading, any you'll end up with config JSON like:
{
"spec": { ...platform agnostic stuff ... },
"linux_config": { ...Linux-specific stuff... }
}
By dropping it and adding a LinuxConfig entry to Spec itself, we get
back to our Markdown-specified:
{
...platform agnostic stuff... ,
"linux": { ...Linux-specific stuff... }
}
As a minor (I hope) wrinkle, I've changed the field name from "linux"
to "linuxx" to avoid:
$ make
protoc --cpp_out=./cpp/ config.proto
pkg-config --cflags protobuf # fails if protobuf is not installed
-pthread
c++ example.cc ./cpp/config.pb.cc -o example_cpp $(pkg-config --cflags --libs protobuf) -I ./cpp
./cpp/config.pb.h:159:25: error: expected unqualified-id before numeric constant
const ::oci::Process& linux() const;
^
...
that seems tied to attributes named "linux". Hopefully someone will
figure out how to avoid that, in which case we can drop the silly
"linuxx" name.
Signed-off-by: W. Trevor King <[email protected]>1 parent 2e87acb commit 9371318
2 files changed
Lines changed: 10 additions & 10 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
| 23 | + | |
| 24 | + | |
| 25 | + | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
| 29 | + | |
| 30 | + | |
24 | 31 | | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
20 | 20 | | |
21 | 21 | | |
22 | 22 | | |
23 | | - | |
24 | | - | |
25 | | - | |
26 | | - | |
27 | | - | |
28 | | - | |
29 | | - | |
30 | | - | |
31 | | - | |
| 23 | + | |
| 24 | + | |
32 | 25 | | |
33 | 26 | | |
34 | 27 | | |
| |||
0 commit comments