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

Support Multiple Targets Packaged Into Single GEM #1028

Closed
crumgary opened this issue Jul 17, 2019 · 2 comments · Fixed by #1034
Closed

Support Multiple Targets Packaged Into Single GEM #1028

crumgary opened this issue Jul 17, 2019 · 2 comments · Fixed by #1034
Labels
Milestone

Comments

@crumgary
Copy link

@crumgary crumgary commented Jul 17, 2019

Is your feature request related to a problem? Please describe.

Having GEM based targets is great, however I have found that with cFE/CFS we commonly divide it up into multiple targets that are tightly related. For cFE 'core' we have six targets that are all released together (es/evs/fs/sb/tbl/time). If we used the Gem based target we would need six different gems and git repos but the software it tracks is really just one package with multiple 'apps'.

Describe the solution you'd like

I would propose we create a DECLARE_GEM_MULTI_TARGET keyword that is very similar to DECLARE_GEM_TARGET except that one of the arguments is a sub-directory for where the target is in a GEM.

Example Usage

system.txt file

DECLARE_GEM_MULTI_TARGET cosmos-gem-multitarget-test TEST_TARGET1
DECLARE_GEM_MULTI_TARGET cosmos-gem-multitarget-test TEST_TARGET2
DECLARE_GEM_MULTI_TARGET cosmos-gem-multitarget-test TEST_TARGET3 TEST_RENAMED_TARGET3

Example Gem Multi Target Directory Layout

cosmos-gem-multitarget-test/
├── cosmos-gem-multitarget-test.gemspec
├── README.md
├── TEST_TARGET1
│   ├── cmd_tlm
│   │   ├── cmds.txt
│   │   └── tlm.txt
│   ├── cmd_tlm_server.txt
│   ├── lib
│   ├── screens
│   └── target.txt
├── TEST_TARGET2
│   ├── cmd_tlm
│   │   ├── cmds.txt
│   │   └── tlm.txt
│   ├── cmd_tlm_server.txt
│   ├── lib
│   ├── screens
│   └── target.txt
└── TEST_TARGET3
    ├── cmd_tlm
    │   ├── cmds.txt
    │   └── tlm.txt
    ├── cmd_tlm_server.txt
    ├── lib
    ├── screens
    └── target.txt

Additional context

Example cosmos gem with multiple targets: https://github.com/crumgary/cosmos-gem-multitarget-test

Example implementation: https://github.com/crumgary/COSMOS/tree/gem-multi

@crumgary

This comment has been minimized.

Copy link
Author

@crumgary crumgary commented Jul 17, 2019

With the current patch I have (crumgary@76fdbf0), AUTO_DECLARE_TARGETS works with Multiple targets in a Gem, however there is a corner case that I'm not sure how we would want handled.

If the gem has a directory cmd_tlm in the base directory it will be added just like any gem target. However, I don't have a way to explicitly declare that target using DECLARE_GEM_MULTI_TARGET. It seems like DECLARE_GEM_TARGET could be use in addition to DECLARE_GEM_MULTI_TARGET but I worry that might be confusing to some.

Example with target at base of gem and in sub-directories:

cosmos-gem-multitarget-test/
├── cmd_tlm
│   ├── cmds.txt
│   └── tlm.txt
├── cmd_tlm_server.txt
├── cosmos-gem-multitarget-test.gemspec
├── lib
├── README.md
├── screens
├── target.txt
├── TEST_TARGET1
│   ├── cmd_tlm
│   │   ├── cmds.txt
│   │   └── tlm.txt
│   ├── cmd_tlm_server.txt
│   ├── lib
│   ├── screens
│   └── target.txt
├── TEST_TARGET2
│   ├── cmd_tlm
│   │   ├── cmds.txt
│   │   └── tlm.txt
│   ├── cmd_tlm_server.txt
│   ├── lib
│   ├── screens
│   └── target.txt
└── TEST_TARGET3
    ├── cmd_tlm
    │   ├── cmds.txt
    │   └── tlm.txt
    ├── cmd_tlm_server.txt
    ├── lib
    ├── screens
    └── target.txt

Example definition:

DECLARE_MULTI_TARGET cosmos-gem-multitarget-test 
DECLARE_GEM_MULTI_TARGET cosmos-gem-multitarget-test TEST_TARGET1
DECLARE_GEM_MULTI_TARGET cosmos-gem-multitarget-test TEST_TARGET2
DECLARE_GEM_MULTI_TARGET cosmos-gem-multitarget-test TEST_TARGET3 TEST_RENAMED_TARGET3
@crumgary crumgary changed the title Support Multiple Targets packaged in single GEM Support Multiple Targets Packaged Into Single GEM Jul 17, 2019
@michaellmonaghan

This comment has been minimized.

Copy link
Contributor

@michaellmonaghan michaellmonaghan commented Jul 18, 2019

I think this would be a great feature

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
4 participants
You can’t perform that action at this time.