enso-org / enso

Hybrid visual and textual functional programming.
https://enso.org
Apache License 2.0
7.34k stars 323 forks source link

`Meta.get_qualified_type_name` does not work when run outside of project #10228

Open Akirathan opened 3 months ago

Akirathan commented 3 months ago

Suppose we have a project Proj with the following files: package.yaml:

name: Proj
namespace: local
version: 0.0.1
license: ''
authors: []
maintainers: []
prefer-local-libraries: true

src/Main.enso:

from Standard.Base import all

type My_Type
    Value x

main =
    obj = My_Type.Value 42
    Meta.get_qualified_type_name obj

Running it with enso --run Proj correctly returns local.Proj.Main.My_Type, but when you run it directly with enso --run Proj/src/Main.enso, it returns just Main.My_Type, which is not a FQN.

The printed names should be the same.

Probably does not work since #8775.

### Tasks
- [ ] Revert workaround https://github.com/enso-org/enso/pull/10192#discussion_r1631112033