Mike Gates
Mike Gates

Reputation: 1904

IronPython compile-time checks against CLR libraries?

I know that IronPython is a dynamically typed language so what I am asking sounds pretty stupid, but is it possible to do something with an IronPython script to make sure the changing of the CLR libraries it references will not result in a runtime error when the script is executed?

The reason I ask is that I have written a library referenced by IronPython scripts in C#, and I want a way to know if I've broken any of the interfaces used by the IronPhon scripts when I change the C# library. This is easy to do with another C# project by just compiling the code and seeing compile errors, but this doesn't seem to work when compiling the IronPython scripts.

Any ideas?

Upvotes: 4

Views: 252

Answers (2)

daftspaniel
daftspaniel

Reputation: 955

A good set of fast running unit tests would be a good alternative to compile time checking.

Upvotes: 1

JaredPar
JaredPar

Reputation: 755367

No, there is no way to statically verify at compile time that the interface changes have not broken your IronPython code. This is the nature of dynamic languages. Such errors are instead presented at runtime

Upvotes: 2

Related Questions