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

feat: Support multiple projects per workspace #25

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

refi64
Copy link
Contributor

@refi64 refi64 commented Jul 13, 2021

This adds the ability to create a .crystalline.yml file in the workspace root containing a list of project folders. Entry points and requires will then all be resolved relative to the individual projects, rather than the root of the workspace.

I would appreciate some more testing! It seems to all work as expected, but I'm also an individual with a limited "project pool" to test on.

This adds the ability to create a `.crystalline.yml` file in the
workspace root containing a list of project folders. Entry points and
`require`s will then all be resolved relative to the individual
projects, rather than the root of the workspace.
@elbywan
Copy link
Owner

elbywan commented Jul 26, 2021

@refi64 Thanks a bunch for this PR!

Sorry for the delay, I'll review and test in the following days.

@n-pn
Copy link

n-pn commented Dec 16, 2022

I think this is rather restricted. Even in a same project you will still have multiple targets for multi services.
Better just provide a glob pattern for each opening file to map it to a particular entry point, instead of limiting it to some sub projects.

For example:

  - glob: [my_project_1/src/**/*.cr]
    main: my_project_1/src/my_project_1.cr
    cwd: my_project_1
    
  - glob: [src/**/*.cr]
    main: src/main_project.cr

for the current working file, just find the first matching glob pattern.

This is more verbose than the original proposal, but I think it offers more flexibility.

@nobodywasishere
Copy link

If it helps at all, how I ended up adding multi-root projects to the vscode extension is by running the dependencies tool on each of the targets in the shards.yml and selecting the first one that had my current file in the output.

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 this pull request may close these issues.

None yet

4 participants