-
Notifications
You must be signed in to change notification settings - Fork 8
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
Use a tools section, rather than X-tool #5
Comments
The purpose of |
Tools could agree to put them in tool specific buckets just as easily as an in X-, the real advantage is that then you can say that nothing can go in the root but what's specified, and tools can put anything they want in the tool specific thing. It both simplifies validation and ensures that you never have a collision between non-specified things and specified things. What's the difference between: {
"x-tool": {
"foo": 1,
}
} and {
"tools": {
"tool": {
"foo": 1
}
}
} except that it prevents someone from doing: {
"tool": {
"foo": 1,
}
} |
I think the |
I guess my thought is that X- always become a standard anyway, even if just a defacto standard. I'm trying to remember where, but I've ready several people noting that using X- was a design mistake, because they become basically required and people rely on them.. what if instead of tools we called it "vendor-data" or "extensions"? |
I think HTTP headers and CSS are the normal culprits there. For the C++20 module dependency format, R0 had a top-level |
OK, found the minutes. The idea there was that extra information may be useful across the object tree. Trying to annotate a component with an extension CMake companion module in a shadowing structure was deemed as messy and a loss of locality. |
At the very least then, can we change the language from "strongly recommended" to "must" for "starts with "X-"? |
Honestly, I'm concerned about cmake (or meson) needing to put information in an X-section, that seems like a great way to end up with cps files that only the build system that created them can consume. |
I hope it mostly gets used for special-case logic for things like CMake APIs provided by a package or the like (e.g., |
To be clear, my concern is that these don't become escape hatches from the purely descriptive format we have, and provide a way for meson to say "run this bit of code," which in turn makes a generated cps file unusable in cmake or autotools if they don't also implement that code. |
There are some things that cannot be described with declarative code. VTK's autoinit system is one such functionality (intersectional usage requirements that end up generating a header). It's a long story, but it's the simplest thing that does what is needed for the use case. That might have CMake-only code for now, but implementations for other systems would be accepted. VTK also provides a CMake API as part of its package. That won't have Meson support (it's just too complicated to port and maintain in parallel), but basic usage of VTK itself wouldn't require CMake to actually work with this. Interpreters could provide snippets for building (or applying properties to) libraries for use in their import systems. |
If that happens, we're doing something wrong and have basically failed at the entire objective. |
I think the goal would be that if an extension is widely used and seen as useful, it should be officially incorporated, losing the For example, say |
That makes my point though. If they go in a |
Is the objection (#39 also) mostly about schema validation? Perhaps I can be convinced. I'd prefer |
For me an analog would be XDG or /opt in LFH documenting the way to keep possibly messy nonstandard things in a specific namespace. I guess XDG could have documented using I'm flexible on the bikeshedding of the field name. LFH uses opt. pyproject.toml uses tool. Maven has plugins and plugin. Cargo supports a package.metadata section. There's a justification for that last example:
I expect a cps-config tool could ship with a validation feature without much work. Package maintainers and package management systems could use that to avoid silly spelling mistakes or possibly premature adoption of new features. |
At the most recent Ecosystem Evolution meeting, we agreed that we want to reserve a single name that can apply to root object types. Leading contenders are |
For the record I personally vote for
|
We could create a Poll in the Discussions tab for the name |
Unfortunately, polls seem to only allow one question and one vote. I'd prefer something more WG21-like. So... let's do that. Voting is open to anyone. For each option, you may vote "SF" (strongly in favor), "F" (in favor), "N" (neutral), "A" (against), "SA" (strongly against). You may also add your own suggestions. Voters are encouraged to check for new suggestions and update their votes accordingly. Please keep voting to a single comment per person (comments are editable). Here's mine:
("SRB" = "Specification Review Board", a nod to "ARB" from the Khronos Group. "SC" = "Specification Committee". "SEP" = "Specification Extension Proposal" or, pertinently, "Somebody Else's Problem". I hereby veto "toolymctoolface".) Some of the options just seem unwieldy. In general, I'd prefer to avoid anything that implies this is only for tool-specific extensions. I think "bikeshed" just seems unprofessional. ("SEP" can be 'cute' also, but at least can be claimed to officially stand for something serious.) |
I'm using a markdown table for my vote. I've also added
|
I'm I'm happy with anything else. So far everyone at least somewhat likes |
|
This is a case where I think that python with it's pyproject.toml made a really good choice, it specified that there would be a "tools" section, like so:
I think this would be a better approach for CPS than the X- fields, there specification could look like, the tools key is an object, containing key: object mappings where the key is the name of the tool, and the object may contain any tool specific data, in the form the tool likes.
This allows the spec to say "no extra keys", for the schema to enforce "no extra keys" and we don't have to worry about collisions in the future if a new key is added and someone has ignored the guidance of using X-tool
The text was updated successfully, but these errors were encountered: