-
Notifications
You must be signed in to change notification settings - Fork 8
Allow separate classpath configuration #21
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 separate classpath configuration #21
Conversation
e7d2a38
to
9f4acc4
Compare
It might be nicer to call this option |
9f4acc4
to
c7fd805
Compare
Updated to use |
…ure *javac.* Per the discussion on SublimeLinter/SublimeLinter-clang#10 it became clear that it is preferred to *not* add extra configuration option beyond `args`. However, specifying a long list of paths for *javac* is tedious, as elements are colon-separated and thus cannot be individual elements in an `args` list. This is completely optional, and offers better maintainability for users working on big projects. Additionally, it allows to set general flags in the preferences of SublimeLinter, while still offering the possibility of setting custom paths for every project. It is enough to offer `classpath`. When `-sourcepath` or `-processorpath` are not specified, the classpath will be searched for source files and annotation processors, too. * * * A comparison for [Litho][]: ``` // classpath "classpath": [ "${project_path}/litho-intellij-plugin/src/main/java", "${project_path}/litho-sections-widget/src/main/java", "${project_path}/litho-processor/src/main/java", "${project_path}/litho-rendercore/src/main/java", "${project_path}/litho-testing/src/main/java", "${project_path}/litho-instrumentation-tests/src/main/java", "${project_path}/litho-core/src/main/java", "${project_path}/codelabs/props/app/src/main/java", "${project_path}/codelabs/layout-spec/app/src/main/java", "${project_path}/codelabs/hello-world/app/src/main/java", "${project_path}/codelabs/hscroll-height/app/src/main/java", "${project_path}/codelabs/state/app/src/main/java", "${project_path}/codelabs/updating-ui/app/src/main/java", "${project_path}/codelabs/save-state-rotation/app/src/main/java", "${project_path}/codelabs/textinput-keyboard/app/src/main/java", "${project_path}/codelabs/mount-spec/app/src/main/java", "${project_path}/codelabs/events/app/src/main/java", "${project_path}/codelabs/group-section-lifecycle/app/src/main/java", "${project_path}/litho-sections-core/src/main/java", "${project_path}/sample-codelab/src/main/java", "${project_path}/litho-sections-debug/src/main/java", "${project_path}/litho-annotations/src/main/java", "${project_path}/sample-barebones/src/main/java", "${project_path}/litho-widget/src/main/java", "${project_path}/litho-it/specs/src/main/java", "${project_path}/litho-it/processor/src/main/java", "${project_path}/litho-it/src/main/java", "${project_path}/sample-barebones-kotlin/src/main/java", "${project_path}/sample/src/main/java", "${project_path}/lib/yoga/src/main/java", "${project_path}/litho-espresso/src/main/java", "${project_path}/litho-sections-annotations/src/main/java", "${project_path}/litho-fresco/src/main/java", "${project_path}/litho-sections-processor/src/main/java", ] // args "args": [ "-sourcepath", "${project_path}/litho-intellij-plugin/src/main/java:${project_path}/litho-sections-widget/src/main/java:${project_path}/litho-processor/src/main/java:${project_path}/litho-rendercore/src/main/java:${project_path}/litho-testing/src/main/java:${project_path}/litho-instrumentation-tests/src/main/java:${project_path}/litho-core/src/main/java:${project_path}/codelabs/props/app/src/main/java:${project_path}/codelabs/layout-spec/app/src/main/java:${project_path}/codelabs/hello-world/app/src/main/java:${project_path}/codelabs/hscroll-height/app/src/main/java:${project_path}/codelabs/state/app/src/main/java:${project_path}/codelabs/updating-ui/app/src/main/java:${project_path}/codelabs/save-state-rotation/app/src/main/java:${project_path}/codelabs/textinput-keyboard/app/src/main/java:${project_path}/codelabs/mount-spec/app/src/main/java:${project_path}/codelabs/events/app/src/main/java:${project_path}/codelabs/group-section-lifecycle/app/src/main/java:${project_path}/litho-sections-core/src/main/java:${project_path}/sample-codelab/src/main/java:${project_path}/litho-sections-debug/src/main/java:${project_path}/litho-annotations/src/main/java:${project_path}/sample-barebones/src/main/java:${project_path}/litho-widget/src/main/java:${project_path}/litho-it/specs/src/main/java:${project_path}/litho-it/processor/src/main/java:${project_path}/litho-it/src/main/java:${project_path}/sample-barebones-kotlin/src/main/java:${project_path}/sample/src/main/java:${project_path}/lib/yoga/src/main/java:${project_path}/litho-espresso/src/main/java:${project_path}/litho-sections-annotations/src/main/java:${project_path}/litho-fresco/src/main/java:${project_path}/litho-sections-processor/src/main/java", ] ``` [Litho]: https://github.com/facebook/litho/
c7fd805
to
c3ac631
Compare
That really makes sense esp. because of the automatic ":" concat SublimeLinter will do here. 👏 you found the "-foo::" trick. Def. will pull this later. LOL that I personally would have chosen "-cp" over "-classpath", maybe familiarity. |
Oh yes 😄 I have to say that the abstractions chosen for SublimeLinter are working really well. Good job! It’s so easy to make these adaptions.
Haha, yes. "-cp" comes so natural. After sleeping over it, "classpath" seemed more human friendly, though. |
This adds
classpath
as an additional configuration option to configure javac.Per the discussion on SublimeLinter/SublimeLinter-clang#10 it became clear that it is preferred to not add extra configuration option beyond
args
. However, specifying a long list of paths for javac is tedious, as elements are colon-separated and thus cannot be individual elements in anargs
list.This is completely optional, and offers better maintainability for users working on big projects.
Additionally, it allows to set general flags in the preferences of SublimeLinter, while still offering the possibility of setting custom paths for every project.
It is enough to offer
classpath
. When-sourcepath
or-processorpath
are not specified, the classpath will be searched for source files and annotation processors, too.A comparison for Litho: