Is there any reason to have multiple import orders?

45 views
Skip to first unread message

Vladimir Sitnikov

unread,
Apr 8, 2014, 3:24:11 PM4/8/14
to opti...@googlegroups.com
Why does optiq use different import order for packages inside the same code base?

If the order were consistent, I would configure package groups in IDEA.

Tricky import order is the most annoying thing ever. Checkstyle is dead slow.

Can you please suggest the way to configure IntelliJIDEA to automatically order packages in optiq order?

PS. Do you mind including IDEA configuration files (i.e. tab width, force {}, etc) into the codebase? I believe this would greately simplify contribution and it would do no harm otherwise.

Vladimir

Julian Hyde

unread,
Apr 8, 2014, 3:35:25 PM4/8/14
to opti...@googlegroups.com
On Apr 8, 2014, at 12:24 PM, Vladimir Sitnikov <sitnikov...@gmail.com> wrote:

Why does optiq use different import order for packages inside the same code base?

The packages had different import orders at the time that I started running checkstyle. I didn’t want to reformat the whole code base.

I am hoping to enter apache incubation soon. If that happens, then we can move everything into org.apache namespace and that will be a good time to change import order. (Also to change the package structure in general.)

If the order were consistent, I would configure package groups in IDEA.

Tricky import order is the most annoying thing ever. Checkstyle is dead slow.

I use the following bash macro. Useful if you like emacs & its compile mode.

emacsValidate() {
    emacs -nw --eval "(compile \"mvn -DskipTests validate | grep '^/'\")"
}

Can you please suggest the way to configure IntelliJIDEA to automatically order packages in optiq order?

PS. Do you mind including IDEA configuration files (i.e. tab width, force {}, etc) into the codebase? I believe this would greately simplify contribution and it would do no harm otherwise.

I don’t like that idea. The pom is a single source. If there are multiple sources for a project, it becomes more confusing for newbies.

You could post one or two configuration files as github gists. We could reference them from the HOWTO.

Julian

Jacques Nadeau

unread,
Apr 8, 2014, 4:41:42 PM4/8/14
to opti...@googlegroups.com
Funny, I was just complaining about this to some guys here this morning.  Why not just disable the ordering requirements until it becomes an incubator project?


--
You received this message because you are subscribed to the Google Groups "optiq-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email to optiq-dev+...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Julian Hyde

unread,
Apr 8, 2014, 4:46:23 PM4/8/14
to opti...@googlegroups.com
Let’s just talk about coding standards and not worry about delivering code at all. When we have arrived at the perfect coding standard it will all just work, right?

Julian

Vladimir Sitnikov

unread,
Apr 23, 2014, 9:11:18 AM4/23/14
to opti...@googlegroups.com
Dears,

Finally I've opened a profiler for mvn validate and I've identified some terrific code in  .... checkstyle (!).

In two words: it does NOT remember if the file successfully passes the audit, and the audit itself is terribly slow.

I hope one day this will land to maven-checkstyle-plugin and we can upgrade.

In the mean time, I wonder if there were attempts to upgrade checkstyle.
checkstyle 5.8-SNAPSHOT reports 63 errors, the major part is "method def throws at indentation level 6 not at correct indentation, 8"

Vladimir
Reply all
Reply to author
Forward
0 new messages