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

Compiler fails to recognise namespace in FQN with enabled GraphBasedChecking #17508

Closed
BoundedChenn31 opened this issue Aug 7, 2024 · 1 comment · Fixed by #17510
Closed

Comments

@BoundedChenn31
Copy link
Contributor

Repro steps

Consider Foo.fs:

namespace MyRootNamespace.A

type Foo() = class end

and following Bar.fs:

namespace MyRootNamespace.A.B

type Bar(foo: MyRootNamespace.A.Foo, s: string) = class end

When GraphBasedChecking is enabled build fails with error:

0>Bar.fs(3,15): Error FS0039 : The namespace or module 'MyRootNamespace' is not defined.

Here is complete solution.
GraphBasedChecking_FullPathError.zip

Expected behavior

Build succeeds without any changes.

Actual behavior

Compiler fails to recognise namespace

Known workarounds

With open MyRootNamespace.A in Bar.fs builds succeeds.
With removed parameter s: string or changed order of s and foo build also succeeds 😮
With GraphBasedChecking disabled build succeeds.

Related information

.NET 9.0.100-preview.6.24328.19
.NET 8.0.303

@BoundedChenn31
Copy link
Contributor Author

@nojaf I was told you would be interested in such things 👀

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

Successfully merging a pull request may close this issue.

1 participant