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

Disambiguate from keyword in CTO syntax #507

Closed
mttrbrts opened this issue Sep 5, 2022 · 0 comments · Fixed by #508
Closed

Disambiguate from keyword in CTO syntax #507

mttrbrts opened this issue Sep 5, 2022 · 0 comments · Fixed by #508

Comments

@mttrbrts
Copy link
Member

mttrbrts commented Sep 5, 2022

Discussion 🗣

In the pre-release version of Concerto v3 we use from to mean different things:

// Meaning "from" a namespace"
import { Foo, Bar } from [email protected].

// Meaning "from" a URI 
import [email protected] from github://path/to/file.cto

This has the effect of restricting the selective imports available for external dependencies, i.e. the following is not possible today.

import { Foo, Bar } from [email protected] from github://path/to/file.cto

I propose that we change the syntax in Concerto v3 to improve the semantics of the keywords and standardise on import syntax.

Some ideas:

import [email protected]
import [email protected].{ Foo, Bar }
import [email protected].*
import [email protected] from github://path/to/file.cto 
import [email protected].{ Foo, Bar } from github://path/to/file.cto 
import [email protected].* from github://path/to/file.cto 

import Foo from [email protected]
import { Foo, Bar } from [email protected]
import * from [email protected] 
import Foo from [email protected] using github://path/to/file.cto 
import { Foo, Bar } from [email protected] using github://path/to/file.cto 
import * from [email protected] using github://path/to/file.cto 

This issue could be tackled alongside #480.

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

Successfully merging a pull request may close this issue.

1 participant