p:step-available('p:validate-with-relax-ng') returns true when p:validate-with-relax-ng is not available #117

Closed
josteinaj opened this Issue Aug 22, 2013 · 4 comments

Comments

Projects
None yet
2 participants
@josteinaj
Contributor

josteinaj commented Aug 22, 2013

When Jing is not on the classpath, p:validate-with-relax-ng doesn't work. However, p:step-available('p:validate-with-relax-ng') still returns true. Shouldn't it return false?

The same probably goes for the other steps which requires external libraries, although I haven't tested those...

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Aug 22, 2013

Owner

Yes, that's a good point. I'll see about fixing that.

Owner

ndw commented Aug 22, 2013

Yes, that's a good point. I'll see about fixing that.

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Sep 22, 2013

Owner

After some investigation, I don't think this is practical.

Realistically, all that p:step-available can tell (in XML Calabash v1.x) is whether or not the step can be instantiated, not whether or not it will run successfully. I think you'll have to use p:try/p:catch to deal with runtime errors.

I'll try to do better in the V.next architecture.

Owner

ndw commented Sep 22, 2013

After some investigation, I don't think this is practical.

Realistically, all that p:step-available can tell (in XML Calabash v1.x) is whether or not the step can be instantiated, not whether or not it will run successfully. I think you'll have to use p:try/p:catch to deal with runtime errors.

I'll try to do better in the V.next architecture.

@ndw ndw closed this Sep 22, 2013

@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Sep 23, 2013

Owner

Changed my mind. :-)

Owner

ndw commented Sep 23, 2013

Changed my mind. :-)

@ndw ndw reopened this Sep 23, 2013

ndw added a commit that referenced this issue Sep 23, 2013

Reworked configuration with an eye towards issue #117. Missing jar fi…
…les and other problems that prevent a class from being instantiated will now cause p:step-available to return false. There's also a static isAvailable() method that steps can use for finer control.

ndw added a commit that referenced this issue Sep 23, 2013

Reworked configuration with an eye towards issue #117. Missing jar fi…
…les and other problems that prevent a class from being instantiated will now cause p:step-available to return false. There's also a static isAvailable() method that steps can use for finer control.
@ndw

This comment has been minimized.

Show comment
Hide comment
@ndw

ndw Sep 23, 2013

Owner

There. That's better.

Owner

ndw commented Sep 23, 2013

There. That's better.

@ndw ndw closed this Sep 23, 2013

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