-
Notifications
You must be signed in to change notification settings - Fork 232
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
Allow applications to provide alternative user-facing messages #918
Comments
To elaborate, while the suggestion to start riak (or any other Erlang app built with |
Is the problem that you really want the command to be named 'start' and not 'daemon'? The command is going to be removed at some point -- it was removed because of that confusion but then added back with the message as a compromise -- mostly because people use it all the time even in contexts where it wouldn't make sense and we hoped to eventually switch to actually descriptive names. Or is there a risk or concern that you can't change that value and you're hoping it is supported as-is forever? |
No objections to |
yeah the long term behaviour is expected to stay as 'daemon', it's just 'start' itself that was counterintuitive because they're all 'start' related but it was not descriptive of its role: foreground, console, daemon -- vs the old style foreground, console, start. If you switch to daemon mode I believe you'll have the same exact behavior without the warning. It also makes it easier to know how to connect to a node (remote_console for console, daemon_attach for daemon). It was really confusing for people to figure out that remote_console does not work with start, only daemon_attach does, because the starting mode has that impact. |
So, to be clear, users run the |
No. Users currently use start. We're happy that they will need to switch to using daemon. However, in the meantime there is a deprecation notice, and we would prefer to be able to override the text for Riak users, with a text that is more directly associated with our use case. Hence the proposal for a way that an application could write its own deprecation text via a pre_start hook. |
There is also a more general question. Perhaps there are other examples of user-facing text (e.g. the response on success/failure to ping) where an application using relx may have a different idea of a what text would be suitable to their users. Perhaps there is a general need to define text that will be presented to the user, in such a way that an application using relx could always override with its own wording. I'm happy to help work on this - with either a specific fix to allow override of the deprecation notice to an alternative text, or a more general change. But I'm interested to see if you consider this to be a useful or acceptable change. |
Hey all -- just bumping this to see if we can get Martin's proposal merged in. |
@aef- that is probably fine. A more general solution would be nice but I think this would be acceptable for the time being. |
Thanks @tsloughter. Currently I've updated the deprecation message on start by allowing the message to be over-written in pre-start hook. I was considering what an effective more general solution should be. Would it be better if I was to add a new type of hook script - If there's an easy way of making it more general, I'm happy to make this part of the PR. In our relx branch we also have an update to allow |
We're using relx for the latest release of the Riak database, and it would be helpful to change some of the user-facing messages that are produced by the extended start script.
The primary issue is the deprecation warning on start. This makes sense to us as relx users (and riak developers), but for a Riak user/operator that is abstracted from the existence of relx/rebar3 being pointed to rebar3.org is confusing. There are also some legitimate use cases for using
start
with Riak.I've hacked together a clumsy change whereby the deprecation warning is deferred until after the pre_start hooks are run, and defined as an environment variable so that we can export an alternative text in the pre-start hooks:
https://github.com/martinsumner/relx/pull/1/files
I'm happy to work on an alternative approach if there is a better answer, or one that allows for overriding messages in a more generic way (perhaps also tackling #758 ?)
The text was updated successfully, but these errors were encountered: