-
Notifications
You must be signed in to change notification settings - Fork 2
feat: configuration of project sources #130
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
base: main
Are you sure you want to change the base?
Conversation
|
Is there a particular reason for expanding |
No particular reason, just the first thing that came to mind. Do you think that would be a better solution? |
It might be easier to test/mock, and be a bit easier to reuse elsewhere. You can simply have No very strong preference though, so don't bother if it's a lot of work to refactor. |
|
Everything looks good to me in principle, would be a good to have a proper code review from @andrius-puksta-sensmetry before merging though. |
Well, this was precisely the type of feedback I was looking for, so I'll definitely consider it.
It's still a draft so far. I want to add some quality of life command line stuff also. |
67ca989 to
4173804
Compare
4173804 to
a418bd2
Compare
a418bd2 to
bf73d16
Compare
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
…ges. Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
…` instead. Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
Signed-off-by: victor.linroth.sensmetry <victor.linroth@sensmetry.com>
bd2ad17 to
0fa5369
Compare
|
Currently The problem stem from the fact that reference of types in macros should be absolute but the absolute paths vary depending on if you are inside or outside the crate. E.g. it's One could try to add them as associated types to Another solution would be to refactor the crates so that they are always used outside of the crate where they are exported. Would essentially mean that all the project stuff goes into it's own crate. |
|
Unsure if |
|
Still left to make sure Windows paths are handled properly (don't think they are at the moment). |
Main new features added by this PR:
sysand.toml(or given config). Allows for portable specification of local and remote sources.--editable,--path,--url-srcand--url-kparforsysand addthat automatically updates config file. These also get removed withsysand remove.In order to simplify implementing the above the
corelibrary was build out with the following changes:ProjectReadandProjectMutderive macros for easy enum composition of project structs.CachedProject<Local, Remote>struct for when theLocalproject is easier to access (e.g. on disk or in memory) vsRemote, but you still want.sources()to give the remote sources.CombinedResolversimplified usingderive(ProjectRead)andCachedProject.ProjectReference<Project>struct. When working withReadEnvironmentthe projects need to be clonable, but this might not always be a good idea, e.g. some project hold ownership of temp dirs.ProjectReferenceis basically andArcwrapper for a project to be used as a compatibility layer.AnyProjectstruct combining the different projects supported for source configuration. Should be extended to include Git projects in future.LocalSrcProjectandLocalKparProjectnow has optional nominal paths in addition to the regular path. This comes from the choice to have configured source always be relative to the project root but this not always being available everywhere. (Could perhaps be simplified if we added a Global Context).In addition there where some small changes that came about when experimenting with different solutions:
MemoryEnvcan now be used with a generic project.MemoryResolvercan be conveniently constructed from iterator/array/Vec.These ended up not being used here, but they could be useful at some later point so where left in.