Skip to content

Add newoption.catagory to documentation, mark os.is as deprecated#1954

Merged
KyrietS merged 2 commits intopremake:masterfrom
thomashope:master
Sep 18, 2022
Merged

Add newoption.catagory to documentation, mark os.is as deprecated#1954
KyrietS merged 2 commits intopremake:masterfrom
thomashope:master

Conversation

@thomashope
Copy link
Contributor

What does this PR do?

Closes #1859

Adds a description of the category option when using newoption.

Also marks os.is() as deprecated which is mentioned in the same issue.

How does this PR change Premake's behavior?

No. Should only be docs changes.

Anything else we should know?

Nope.

Did you check all the boxes?

  • Focus on a single fix or feature; remove any unrelated formatting or code changes
  • Add unit tests showing fix or feature works; all tests pass
  • Mention any related issues (put closes #XXXX in comment to auto-close issue when PR is merged)
  • Follow our coding conventions
  • Minimize the number of commits
  • Align documentation to your changes

| value | Optional. If the option needs a value, provides a hint to the user what type of data is expected. |
| allowed | Optional. A list of key-value pairs listing the allowed values for the option. |
| default | Optional. Sets the default for this option if not specified on the commandline. |
| category | Optional. Places the option under a seperate header when the user passes `--help` |
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
| category | Optional. Places the option under a seperate header when the user passes `--help` |
| category | Optional. Places the option under a separate header when the user passes `--help` |

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks! Fixed with a force push to minimise commits. Sorry if that means you miss out on credit...

@nickclark2016
Copy link
Member

Will leave this open for comment for a few days, then merge if no changes need to be made.

os.is("id")
```

**This function has been deprecated.** Use [os.target()](os.target.md) or [os.host()](os.host.md) instead.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe we could use fancy-dancy Admonitions for the first time on our website? 😀

It would be:

:::caution
**This function has been deprecated.** Use [os.target()](os.target.md) or [os.host()](os.host.md) instead.
:::

I've tested it on my local demo branch for configuration: https://kyriets.github.io/premake-core/docs/configuration/

What do you think?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Ah yes, I was actually looking for something like this.

Happy to make this change and also make a separate PR that uses them for all deprecation notices?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

On second thoughts, maybe it's clearer to leave this PR as is and make a new one that does the change everywhere

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we use it here now, in case no one gets around to the follow up PR to do it everywhere immediately.

@thomashope
Copy link
Contributor Author

Bump, any other change requests?

@KyrietS KyrietS merged commit 1ea9adf into premake:master Sep 18, 2022
@KyrietS
Copy link
Member

KyrietS commented Sep 18, 2022

Thanks for your contribution 🤗

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

List user defined options separated with premake system options when using "premake --help"

4 participants