-
Notifications
You must be signed in to change notification settings - Fork 21
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
[RFC] Use a submodule to avoid duplicating source code #12
base: master
Are you sure you want to change the base?
Conversation
For reference, those two files are exactly the same, hence why I started there:
|
Unfortuately, dmc has not been ported to Linux. |
Right. Does it work on win64 or only win32 ? I'll see if I can put a Windows Github CI in place. |
Only Win32 |
@WalterBright : How do you compile DMC yourself ? The instructions in the README seem rather out of date. |
Oops, I had omitted symtab.d. It's there now. I compile using |
@Geod24 there's another problem, sometimes my efforts at syncing dmd with dmc fall behind, at the moment dmc is a bit behind. I need to do some work there. |
@WalterBright : I've made good progress, and I'm now blocked by the usage of Line 47 in e8557fa
|
Oops. Not sure what to do about that. |
@WalterBright : Actually I can just use an older compiler. |
Added. Obviously, I haven't built dmc from the git repository. Shame on me. |
I'm not changing dmc so it requires code from dmd to be built. It's much easier to deal with as a separate project. I've also tried to keep the dmd backend from getting entangled with the dmd front end, although a couple imports have crept in. P.S. One of the reasons I've resisted "packagizing" the dmd front end is because the packages all wind up importing each other rendering it more a nuisance than an aid. Packages (and the backend is a package) should really strive to not import anything uplevel or sideways. |
I fully agree with you here. I really think the backend should be a separate project, that could live as a submodule for both DMD and DMC. But I'm not sure you'd agree with this. |
I concur with @Geod24 here, having the backend be a submodule would be much easier as it creates separation of concerns. |
4490f17
to
fa4069d
Compare
This will allow us to remove the duplication between DMC and DMD, and simplify updating DMC whenever DMD changes.
fa4069d
to
3a46e92
Compare
@WalterBright : Since any change to the backend means painful duplication for you, I propose that we refer to DMD directly and remove the duplication completely.
By doing so, you can incrementally advance the submodules, resulting in less effort when adapting code, but we can also add a CI job in DMD which tests that DMC isn't broken, like Buildkite currently test that we don't break other people's projects.
Unfortunately I am not able to test the changes because there's no instructions on how to build on POSIX.
I took a look at https://github.com/DigitalMars/Compiler/blob/master/dm/src/dmc/posix.mak but it's still referencing the
.c
source files.If you would like to test, you can do this:
$ git clone https://github.com/Geod24/Compiler.git mathias-dmc $ cd mathias-dmc/ $ git submodule update --init
The compile as you are used to (I suspect
cd dm/src/dmc && make
?).