Re: Modules ... "import" vs. "compilation" ... what is the real process here?

2021-09-28 Thread Steven Schveighoffer via Digitalmars-d-learn
On 9/28/21 1:59 AM, james.p.leblanc wrote: On Tuesday, 28 September 2021 at 05:26:29 UTC, Ali Çehreli wrote: On 9/27/21 10:38 AM, james.p.leblanc wrote: In addition to what Mike Parker said, templates do complicate matters here: Templates are instantiated (i.e. compiled for a specific set o

Re: Modules ... "import" vs. "compilation" ... what is the real process here?

2021-09-27 Thread james.p.leblanc via Digitalmars-d-learn
On Tuesday, 28 September 2021 at 05:26:29 UTC, Ali Çehreli wrote: On 9/27/21 10:38 AM, james.p.leblanc wrote: In addition to what Mike Parker said, templates do complicate matters here: Templates are instantiated (i.e. compiled for a specific set of template arguments) by modules that actua

Re: Modules ... "import" vs. "compilation" ... what is the real process here?

2021-09-27 Thread james.p.leblanc via Digitalmars-d-learn
On Tuesday, 28 September 2021 at 02:05:43 UTC, Mike Parker wrote: On Monday, 27 September 2021 at 17:38:29 UTC, james.p.leblanc mpilations". Does that help? **Yes!...** === ... this helped immensely! This explanation gave me a much better understanding of how the whole process works.

Re: Modules ... "import" vs. "compilation" ... what is the real process here?

2021-09-27 Thread Ali Çehreli via Digitalmars-d-learn
On 9/27/21 10:38 AM, james.p.leblanc wrote: > I have trouble understanding "module imports" vs. "module compilations". In addition to what Mike Parker said, templates do complicate matters here: Templates are instantiated (i.e. compiled for a specific set of template arguments) by modules that

Re: Modules ... "import" vs. "compilation" ... what is the real process here?

2021-09-27 Thread Mike Parker via Digitalmars-d-learn
On Monday, 27 September 2021 at 17:38:29 UTC, james.p.leblanc wrote: Dear D-ers, I have trouble understanding "module imports" vs. "module compilations". A module is implemented in a source file. Though we often use the term "module" to refer to both, it may help to think in terms of import

Re: modules and mains

2021-08-22 Thread Brian Tiffin via Digitalmars-d-learn
On Sunday, 22 August 2021 at 10:24:13 UTC, Mathias LANG wrote: On Sunday, 22 August 2021 at 03:22:02 UTC, Brian Tiffin wrote: ... IIUC, you want to generate multiple binaries, too ? In which case, I think you need more of a build tool solution than a language solution. Recent-ish versions o

Re: modules and mains

2021-08-22 Thread Mathias LANG via Digitalmars-d-learn
On Sunday, 22 August 2021 at 03:22:02 UTC, Brian Tiffin wrote: Is this wrong thinking? I'm ~~working on~~ playing with a first project. Meant to be a suite of tools, each usable from the command line, i.e. with a `main`. Then a manager program that accepts subcommands for dispatch *and othe

Re: modules and mains

2021-08-21 Thread Brian Tiffin via Digitalmars-d-learn
On Sunday, 22 August 2021 at 04:38:58 UTC, Ali Çehreli wrote: On 8/21/21 8:46 PM, Brian Tiffin wrote: > prompt$ cat B.d > module B; > version = boss; A cannot know about 'version' condition inside B. The solution is to provide version on the command line. This is how I do it with dmd: $ dmd

Re: modules and mains

2021-08-21 Thread Ali Çehreli via Digitalmars-d-learn
On 8/21/21 8:46 PM, Brian Tiffin wrote: > prompt$ cat B.d > module B; > version = boss; A cannot know about 'version' condition inside B. The solution is to provide version on the command line. This is how I do it with dmd: $ dmd -version=boss [...] (So, remove 'version = boss;' line in B.d

Re: modules and mains

2021-08-21 Thread Brian Tiffin via Digitalmars-d-learn
On Sunday, 22 August 2021 at 03:22:02 UTC, Brian Tiffin wrote: Is this wrong thinking? I'm ~~working on~~ playing with a first project. Meant to be a suite of tools, each usable from the command line, i.e. with a `main`. Then a manager program that accepts subcommands for dispatch *and othe

Re: Modules

2016-07-24 Thread Jonathan Marler via Digitalmars-d-learn
On Sunday, 24 July 2016 at 02:45:57 UTC, rikki cattermole wrote: On 24/07/2016 2:28 PM, Rufus Smith wrote: NM, ignore. Seems it was something else going on. Although, if you know how how dmd resolves this stuff exactly, it would be nice to know. Does it just use the module names regardless of p

Re: Modules

2016-07-23 Thread rikki cattermole via Digitalmars-d-learn
On 24/07/2016 2:28 PM, Rufus Smith wrote: NM, ignore. Seems it was something else going on. Although, if you know how how dmd resolves this stuff exactly, it would be nice to know. Does it just use the module names regardless of path or does the path where the module is located have any play(assu

Re: Modules

2016-07-23 Thread Rufus Smith via Digitalmars-d-learn
NM, ignore. Seems it was something else going on. Although, if you know how how dmd resolves this stuff exactly, it would be nice to know. Does it just use the module names regardless of path or does the path where the module is located have any play(assuming they are properly passed to the com

Re: modules in other directory trees

2012-11-02 Thread Tobias Pankrath
On Wednesday, 31 October 2012 at 23:01:52 UTC, dsmith wrote: What is your way to import modules from other directory trees? Here is my (incorrect?) ideal: Given: /home/user/library_directory/ Containing: lib_one.d lib_two.d lib_interface.d lib_interface.d source: module lib_interface; public

Re: Modules/packages and cryptic errors

2009-10-31 Thread Frank Benoit
al schrieb: > Frank Benoit Wrote: > >> al schrieb: >>> module bar is in multiple defined >> This often indicates a modules file name and the identifier in the >> "module" statement are unequal (case sensitivity) > > I have all files and imports lowercase. I have class names following > filenames

Re: Modules/packages and cryptic errors

2009-10-31 Thread al
Frank Benoit Wrote: > al schrieb: > > module bar is in multiple defined > > This often indicates a modules file name and the identifier in the > "module" statement are unequal (case sensitivity) I have all files and imports lowercase. I have class names following filenames capitalized, but that

Re: Modules/packages and cryptic errors

2009-10-31 Thread Frank Benoit
al schrieb: > module bar is in multiple defined This often indicates a modules file name and the identifier in the "module" statement are unequal (case sensitivity)