Skip to content

Global namespace vs file #9558

@timotheeguerin

Description

@timotheeguerin

Wondering if we could make a change so that you never update the global namespace for anything but adding a namespace.

Which means if you add scopeless types to a typespec file it would still scope it to a virtual file namespace and 2 files wouldn't conflict with each other.

For example the following would have no issue

import "./b.tsp";

model A {}
// b.tsp

model A {} 

This comes up as defining Model or Operation or any types under Reflection directly at the root of a project just crash everything.

Metadata

Metadata

Assignees

No one assigned

    Labels

    compiler:coreIssues for @typespec/compilerdesign:neededA design request has been raised that needs a proposaltriaged:core

    Type

    No type

    Projects

    No projects

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions