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
Make pylint and jsl optional #502
Conversation
|
Please clean up the confgure.ac and update freeipa.spec file as well. |
|
good catch, @tomaskrizek |
|
May I know why the default was changed without design discussion? IIRC pscacek intentionally enabled it by default. Much better approach would be to print hint at configure time detection that it is optional and can be disabled. Code wise; the change is too complicated (too many nested if condition ...) |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Code wise; the change is too complicated (too many nested if condition ...)
which does not improve readability of configure.ac
|
Please see ticket for reasoning. My solution is the best thing, I could come up with in short time. It's not worth the trouble to burn a lot of time on it. It's write-once code. You are welcome to provide a better solution. I know your autoconf Fu is stronger than mine. |
|
Writing hint together with error is the simplest solution. And still remind developers to install pylint/jslint. e.g. |
|
Please add explanation to the thumb down |
|
It was explained on IRC
But there is main problem with this PR. The design document expected these option enabled by default. This is a reason why I mentioned to log just a hint for optional *lint dependencies. And ticket https://pagure.io/freeipa/issue/6604 says that options were made optional a moth ago master: |
|
@lslebodn We don't want to have linters enabled by default when you run |
e.g. I know that @rcritten had strong opinion about pylint usage in past. |
|
@tomaskrizek good point, I added a TODO item to the ticket, https://pagure.io/freeipa/issue/6604#comment-415669 |
|
Wiki page updated (along with `--without-ipatests`` option from #364). @lslebodn Ok, let's keep the PR open for a couple days to see if there's any disagreement. I don't see this as a drastic change that should be widely discussed, but feel free to bring up the topic on |
|
Since we have gating here each PR is checked by linters, commits are checked before pushed, that was reason why linters are optional now in build. |
|
+1 Reasoning for not skipping linters was that reviewer or patch author can forget to run those. This problem was solved by travis checks. |
|
On (01/03/17 09:39), Petr Vobornik wrote:
+1 Reasoning for not skipping linters was that reviewer or patch author can forget to run those. This problem was solved by travis checks.
ATM nothing force reviewer/author to run lint. `makerpms.sh` does not call
`make lint` and it is not a dependency of `make all`.
configure script just remind developer to install pylint/jslint.
(or disable configure time check)
Which is a huge difference.
If you think that developers should not/needn't have installed pylint by
default then it's your decission. But I cannot see a good reason for
removing this reminder.
my 2 cents
|
|
I tend to agree with @lslebodn, but I don't have a strong opinion on this. I noticed a couple of issues though:
|
|
On (01/03/17 22:37), Jan Cholasta wrote:
I tend to agree with @lslebodn, but I don't have a strong opinion on this. I noticed a couple of issues though:
* `--without-jslint` does not seem to work correctly:
```
$ ./configure --without-jslint
...
IPA Server 4.4.90.dev201703020634+git3a29b47
========================
...
jslint: /usr/bin/jsl
...
```
* In `freeipa.spec.in`, when `with_lint` is not defined, lint should be disabled, so `--disable-pylint` and `--without-jslint` should be passed to `%configure`.
This is exactly a reason why the simplest solution would be
to exend error messages without changing default.
Default "yes" should encourage downstream packagers[1,2] to run
make lint and catch issues with backported(downstream only) patches.
BTW there were also some version of packages for opensuse[2]
but they were removed.
[1] https://anonscm.debian.org/cgit/pkg-freeipa/freeipa.git
[2] https://en.opensuse.org/Portal:FreeIPA
|
|
There's an ongoing discussion about the acceptance of the patch. Removing the ACK label until the acceptance is agreed on. Please, @lslebodn or @tomaskrizek, add the label back once that is done. However, please, try to cut the discussion short and make the decision in the least comments possible. |
|
Since Pylint can be disabled with I suggest the following:
|
|
@tomaskrizek autoconf is a bit magic. I pushed another fix that fixed a bug in my logic and replaces some complicated checks with a straight-forward |
freeipa.spec.in
Outdated
| @@ -11,10 +11,7 @@ | |||
| # lint is not executed during rpmbuild | |||
| # %%global with_lint 1 | |||
| %if 0%{?with_lint} | |||
| %global enable_pylint_option --enable-pylint | |||
| %else | |||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
As @HonzaCholasta mentioned, if with_lint is not defined, linting should be disabled.
|
Which audience is our primary concern here?
I'm for upstream first. Packaging is pretty much automated and scripted. A packager can easily adjust a script for a new version. There also just a handful of distributions (Fedora/RHEL/CentOS, Debian/Ubuntu, SuSE, Gentoo). |
|
@tiran Needs rebase. |
|
I am still expect some comment from @rcritten
LS
|
12e21b6
to
fe062ff
Compare
|
The PR got three +1 / heart and not -1. I propose to get it merged for 4.5 today. |
./configure no longer fails when pylint or jsl are not available. The make targets for pylint and jsl are no longer defined without the tools. Rational: pylint and jsl are not required to build FreeIPA. Both are useful developer tools. It's more user friendly to make both components optionally with default config arguments. There is no reason to fail building on a build system without development tools. It's still possible to enforce dependency checks with --with-jslint and --enable-pylint. https://fedorahosted.org/freeipa/ticket/6604 Signed-off-by: Christian Heimes <cheimes@redhat.com>
|
On (14/03/17 09:56), Christian Heimes wrote:
The PR got three +1 / heart and not -1. I propose to get it merged for 4.5 today.
I cannot see 3-times +1 in this PR.
I can see just 2 reviewers in top right corner
* lslebodn requested changes
* tomaskrizek approved these changes
Is there any reason why upstream discussion is not accepted?
https://www.redhat.com/archives/freeipa-devel/2017-March/msg00371.html
LS
|
|
two thumbs up, one heart, no thumbs down |
|
This PR makes packaging IPA 4.5 on RHEL 7 easier for me, so thumbs up from me. |
|
PR #593 is not related to default yes; It is about something else. Current version does not fix concerns; because default should be yes as it was discussed in https://www.redhat.com/archives/freeipa-devel/2017-March/msg00371.html I looks like upstream discussion is useless. And nobody cares about other distributions then fedora/rhel which can parse recommendation form upstream spec file. I am really disappointed from such upstream unfriendly approach. |
I understand it is more convenient to have less extra configure options in rhel; @HonzaCholasta it would be good if you add comment also to upstream discussion; if you prefer autodetection. It would be good if result of discussion is the same as pushed patch. Current version will not persuade other distributions(debian; openSUSE) to run pylint as part of build. |
|
On (14/03/17 16:05), Christian Heimes wrote:
#502 (comment)
two thumbs up, one heart, no thumbs down
My naive assumption was that discussion about apprach was moved
to freipa-devel.
|
|
@lslebodn, nobody said that this has to be the last lint build related patch ever, we can change the behavior later, even on top of this PR. I would rather push this now and continue the discussion / submit additional PRs after 4.5 is released. |
|
On (15/03/17 05:17), Jan Cholasta wrote:
@lslebodn, nobody said that this has to be the last lint build related patch ever, we can change the behavior later, even on top of this PR. I would rather push this now and continue the discussion / submit additional PRs after 4.5 is released.
But it would be good to have patch/approach in **official release**
which was result of upstream discussion.
Does it mean that I should improve error messages myself?
LS
|
|
4.5.1 will be an official release too. |
|
There was no result in the upstream discussion. My personal opinion is that one way or the other can work. They are for different use cases. I tend to prefer the "be easier for developer" approach. That said, preferred method for downstreams needs to be documented ideally in BUILD.txt. In any case spending so much time discussing so minor change is a waste of time. I'd push it. |
|
On (15/03/17 05:32), Petr Vobornik wrote:
In any case spending so much time discussing so minor change is a waste of time. I'd push it.
Will you accept patch whith improves error messages?
I can send it in few minutes; I do not want to creat PR which will be rejected.
LS
|
|
master:
|
|
If it improves messages then I assume so provided that in won't be controversial in other aspects. |
./configure no longer fails when pylint or jsl are not available. The
make targets for pylint and jsl are no longer defined without the tools.
Rational:
pylint and jsl are not required to build FreeIPA. Both are useful
developer tools. It's more user friendly to make both components
optionally with default config arguments. There is no reason to
fail building on a build system without development tools.
It's still possible to enforce dependency checks with --with-jslint and
--enable-pylint.
https://fedorahosted.org/freeipa/ticket/6604
Signed-off-by: Christian Heimes cheimes@redhat.com