'configurePreset' option is wrongly required
See original GitHub issueAccording to the action.yml file, 'configurePreset'
is not a required input. However, if you don’t provide it you get the following error:
Error: Input required and not supplied: configurePreset
at Object.getInput (/home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:10092:15)
at ActionLib.getInput (/home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:9160:26)
at new CMakeRunner (/home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:4033:56)
at Function.<anonymous> (/home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:4042:37)
at Generator.next (<anonymous>)
at /home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:4010:71
at new Promise (<anonymous>)
at module.exports.214.__awaiter (/home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:4006:12)
at /home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:4041:111
at Object.using (/home/runner/work/_actions/lukka/run-cmake/v10/dist/index.js:12975:18)
Since I’m using 'configurePresetCmdString'
, I simply put a random string as input to 'configurePreset'
to make it work (and the action correctly uses the command string instead of the random configure preset). However, it would be nice if I didn’t have to pass a random value to 'configurePreset'
.
Same thing goes for 'buildPreset'
.
Thanks!
Issue Analytics
- State:
- Created a year ago
- Reactions:1
- Comments:7 (4 by maintainers)
Top Results From Across the Web
Share buildPresets with multiple configurePresets (#22719)
I'd like to be able to easily share a single build preset with multiple configure presets so I can set 'Debug' and 'Release'...
Read more >Configure and build with CMake Presets in Visual Studio
All Build Presets are required to specify an associated configurePreset value. Visual Studio hides Build Presets that don't apply to the ...
Read more >vscode-cmake-tools/cmake-presets.md at main
This command lists several Configure Preset templates, along with a [Scan for Compilers] option in the command palette. [Scan for Compilers] returns all...
Read more >Support CMake presets : CPP-22906 - YouTrack
CPP-25020 Provide an option to convert CMake Profile into CMake Preset ... does not have configurePreset field" when configure preset does not exist....
Read more >Changelog — conan 1.56.0 documentation
txt (for conan build) when configure() remove some setting. Bugfix: Correct use of unix paths in Windows subsystems (msys, cygwin) when needed. Fix:...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@quyykk right, the documentation states that the
configurePreset
is optional, when it is not. The docs should be fixed. It makes sense to me that the input is required as the project generation is required as well, otherwise the build would not work as the project files were missing.Regarding your suggestion to make the
configurePreset
input optional, it can certainly be done at the cost of reworking the code and validate the changes and updating the documentation. I think another approach would be to go with the current code flow, which uses the presence of theconfigurePreset
input, or thebuildPreset
input, as a way to identify whether to run or not the CMake configuration, or the build. That is if you do not specifyconfigurePreset
input, the project generation will not happen and yourconfigurePresetCmdString
will not be used either.Rather than using a dummy string as the input, I think this would be ok for your use case:
Note that due to this long standing issue https://github.com/actions/toolkit/issues/272, the
configurePreset
cannot be empty (rather than a dummy string), which would be a more sensible way to indicate to the action the intention to run the project generation, without actually providing a dummy and meaningless string as a value.Let me know if all of this makes sense to you as well, thanks.
@rcoup perhaps the configure step could be optional indeed, and as of now it is not, but it could be easily fixed. Questions: