Skip to content
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

Cannot mix in non-composable type Any into object #2983

Closed
nkh opened this issue Jun 13, 2019 · 4 comments
Closed

Cannot mix in non-composable type Any into object #2983

nkh opened this issue Jun 13, 2019 · 4 comments
Labels
regression Issue did not exist previously

Comments

@nkh
Copy link

nkh commented Jun 13, 2019

on linux with rakudo:
This is Rakudo version 2019.03.1-616-g6565810f5 built on MoarVM version 2019.05-53-gcce71cdbf
implementing Perl 6.d.

from IRC:
nadim_: I don't know how the regex influences it, but the problem is that required_role is being exported as a class (i.e. it has ClassHOW meta).

The attached shell script generates files needed to reproduces the error and runs tests

test_bug.sh.txt

@vrurg vrurg added the regression Issue did not exist previously label Jun 13, 2019
@vrurg
Copy link
Member

vrurg commented Jun 13, 2019

Brief note: the role somehow gets punned while imported and ends up as a Metamodel::ClassHOW instance.

@vrurg
Copy link
Member

vrurg commented Jun 13, 2019

After having some fun fighting with bisectable, AlexDaniel managed to get the following output from commitable:

¦«5bbaabb9c6^^^^^^»:
Perl6::Metamodel::ParametricRoleHOW

¦«5bbaabb9c6^^^^^,5bbaabb9c6^»:
Cannot test this commit (Commit exists, but a perl6 executable could not be built for it)
¦«5bbaabb9c6^^^^,5bbaabb9c6^^^,5bbaabb9c6^^»:
Cannot find method 'FLATTENABLE_HASH' on object of type Mu
  in block <unit> at sandbox/role-import.pl line 4

 «exit code = 1»
¦«5bbaabb»:
Perl6::Metamodel::ClassHOW

@vrurg
Copy link
Member

vrurg commented Jun 20, 2019

@nkh It is currently being decided what's to be done with this situation. The point is that require is not supposed to be working this way. If you check with documentation, it states that type object are not supposed to be imported this way. The mechanism was designed to import variables (sigilled entities).

vrurg added a commit to vrurg/rakudo that referenced this issue Jun 20, 2019
Prevent extra containerization of type objects and constants.

rakudo#2983
vrurg added a commit to vrurg/roast that referenced this issue Jun 20, 2019
Testing if type objects and constants are imported as is while scalars
preserve their container.

rakudo/rakudo#2983
@vrurg
Copy link
Member

vrurg commented Jun 20, 2019

Closed via #3005

@vrurg vrurg closed this as completed Jun 20, 2019
vrurg added a commit to vrurg/rakudo that referenced this issue Sep 23, 2019
Prevent extra containerization of type objects and constants.

rakudo#2983
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
regression Issue did not exist previously
Projects
None yet
Development

No branches or pull requests

2 participants