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

I know I have cycle and I want to include it in test. #61

Open
pmajkutewicz opened this Issue Oct 30, 2015 · 4 comments

Comments

Projects
None yet
2 participants
@pmajkutewicz

pmajkutewicz commented Oct 30, 2015

Hi

I have 4 packages:

example.a, example.b, example.c, example.d

With cycle between a and c and that is ok.

My test:

assertThat(
classpath()
.noJars()
.including("example.**")
.allow(oneOf("example.a", "example.c"), oneOf("example.a", "example.c"))
, is(violationFree()))

fails with:

java.lang.AssertionError: 
Expected: is "de.schauderhaft.degraph.check.Check$$anon$1"
     but: Configuration{classpath = [snip]
includes = example.**
constraints = no cycles
} yields the following constraint violations: [Package](no cycles):
    example.a -> example.c
    example.c -> example.a

I've also tried adding .withSlicing("module", "example.(*).**") but I'm still getting assertion error.
Is there a way to configure degraph for that kind of situation?

@schauder

This comment has been minimized.

Show comment
Hide comment
@schauder

schauder Oct 30, 2015

Owner

Unfortunatly no, not with the current version.

It always checks for cycles.

I'm currently working on a reworked API for formulating tests, and the new version will

a) make the check for cycles optional
b) will allow to ignore dependencies for the analysis

So in you example you could either not check for cycles at all, or ignore for example the dependency from example.c to example.a

Owner

schauder commented Oct 30, 2015

Unfortunatly no, not with the current version.

It always checks for cycles.

I'm currently working on a reworked API for formulating tests, and the new version will

a) make the check for cycles optional
b) will allow to ignore dependencies for the analysis

So in you example you could either not check for cycles at all, or ignore for example the dependency from example.c to example.a

@pmajkutewicz

This comment has been minimized.

Show comment
Hide comment
@pmajkutewicz

pmajkutewicz Oct 30, 2015

Oh nice, so second solution will solve my problem :).

Any ETA on new API ? (days, month, months?)

pmajkutewicz commented Oct 30, 2015

Oh nice, so second solution will solve my problem :).

Any ETA on new API ? (days, month, months?)

@schauder

This comment has been minimized.

Show comment
Hide comment
@schauder

schauder Oct 30, 2015

Owner

Maybe end of the year, or early next year. I hope.

Owner

schauder commented Oct 30, 2015

Maybe end of the year, or early next year. I hope.

@pmajkutewicz

This comment has been minimized.

Show comment
Hide comment
@pmajkutewicz

pmajkutewicz Oct 30, 2015

OK, good to know. I'll wait.
Thanks.

pmajkutewicz commented Oct 30, 2015

OK, good to know. I'll wait.
Thanks.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment