Skip to content
This repository has been archived by the owner on Aug 6, 2023. It is now read-only.

Sort our targets #13

Closed
artemyarulin opened this issue Jan 31, 2016 · 0 comments
Closed

Sort our targets #13

artemyarulin opened this issue Jan 31, 2016 · 0 comments

Comments

@artemyarulin
Copy link
Owner

Currently we have only one build target that builds tests as well.

If we build dependencies graph it would look like module depends on actual dependencies plus test dependencies, while test dependencies is needed only for testing.

So, the end result (including #6) should look like:
Build targets:

  • :example.src - creates project, gathers modules, inject dependencies into project file, outputs source files
  • :example.build - takes :example.src as an input and outputs either class files or js file with simple optimizations
  • :example.build_tests - takes :example.src and merges there test files and test dependencies, then builds the project without running

If main specified additionally:

  • :example.release- takes :example.src as an input and outputs either uberjar or js file with advanced optimisations

Test targets:

  • :example.test

Two additional macros should be created clj_test and cljs_test. We should continue support tests/test_modules/test_dependencies in clj(s)_module as it's useful shortcut and covers the most often case. Although it should be possible to created additional test targets for the cases like integration test, performance, etc.

Example:

clj_module(name = 'integration',
           target = ':example.src',
           src = ['integration_test.clj'])

which additionally should produce build target :example.build_test_integration and test target :example.test_integration

Alternative way could be to support multiple test targets inside clj(s)_module, something like:

clj_module('example',
           test_modules = ['//test-helper/a','//test-helper/b'],
           test_deps = ['[some-test-dep "0.0.1"'],
           tests = {'unit':['unit_test.clj'],
                    'integration':['integration_test.clj']})
artemyarulin pushed a commit that referenced this issue Feb 3, 2016
…build phase, cljs_test introduced, ns handled automatically, test project added

Fixes #13
Fixes #11
Fixes #12
Fixes #8
Fixes #6
Fixes #5
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant