objectionary / eo

EOLANG, an Experimental Pure Object-Oriented Programming Language Based on 𝜑-calculus
https://www.eolang.org
MIT License
1.01k stars 126 forks source link

PhPackage need update #3263

Open levBagryansky opened 2 months ago

levBagryansky commented 2 months ago

We need update it in several places: 1) https://github.com/objectionary/eo/blob/master/eo-runtime/src/test/java/org/eolang/PhPackageTest.java#L171 goto does not exist now, we have go. Currently it returns new PhPackage according to https://github.com/objectionary/eo/blob/master/eo-runtime/src/main/java/org/eolang/PhPackage.java#L96 2) https://github.com/objectionary/eo/blob/master/eo-runtime/src/main/java/org/eolang/PhPackage.java#L57 We can get rid of ConcurrentHashMap or ThreadLock here. 3) Now if PhPackage does not have attribute to be found, it returns new PhPackage(this.eoPackage(name)) (in https://github.com/objectionary/eo/blob/master/eo-runtime/src/main/java/org/eolang/PhPackage.java#L96) . So it does not even check if the package exists. May be it would be better to throw exception if there is not such package? @yegor256 WDYT?

Also there is deadlock somewhere according to #3245 but I cannot repeat error.

github-actions[bot] commented 2 months ago

@levBagryansky thanks for the report, here is a feedback:

Problems

I would recommend providing a clear and descriptive title that specifies the necessary updates in the PhPackage.

Please fix the bug report in order it to get resolved faster. Analyzed with gpt-4

levBagryansky commented 2 months ago

@volodya-lombrozo WDYT