Thread overview | ||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
|
March 09, 2006 imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Walter, we still have: gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) these are both private import std.string; the interesting thing is that I had a private import std.c.stdio; in one module that would supply std.string to a bunch of other modules well, I know you cannot do anything about this and I know I cannot reduce this problem... but it's better than 2 year ago! :) Ant |
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | On Wed, 08 Mar 2006 19:35:22 +0000, Ant <duitoolkit@yahoo.ca> wrote:
> Walter, we still have:
>
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>
>
> these are both private import std.string;
>
> the interesting thing is that I had a
> private import std.c.stdio;
> in one module that would supply std.string to a bunch of other modules
>
> well, I know you cannot do anything about this
> and I know I cannot reduce this problem... but it's better than 2 year ago! :)
If you post the code here someone else might have a go at reducing it.
Regan
|
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | Regan Heath wrote: > On Wed, 08 Mar 2006 19:35:22 +0000, Ant <duitoolkit@yahoo.ca> wrote: >> Walter, we still have: >> >> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >> >> >> these are both private import std.string; >> >> the interesting thing is that I had a >> private import std.c.stdio; >> in one module that would supply std.string to a bunch of other modules >> >> well, I know you cannot do anything about this >> and I know I cannot reduce this problem... but it's better than 2 year ago! :) > > If you post the code here someone else might have a go at reducing it. > > Regan :) ! linux 0.148 wait, let me grad 149... yep some with 149 grab http://svn.dsource.org/projects/dui/trunk/src move the imports in src/gtk/TextBuffer.d to the module level private import std.stdarg; private import std.string; from the src dir compile the duitGtk lib with (change the absolute dirs at the end): dmd gtk/AboutDialog.d gtk/AccelGroup.d gtk/AccelLabel.d gtk/AccelMap.d gtk/Accessible.d gtk/Action.d gtk/ActionGroup.d gtk/Adjustment.d gtk/Alignment.d gtk/Arrow.d gtk/AspectFrame.d gtk/Bin.d gtk/BindingSet.d gtk/Box.d gtk/Button.d gtk/ButtonBox.d gtk/Calendar.d gtk/CellEditable.d gtk/CellLayout.d gtk/CellRenderer.d gtk/CellRendererCombo.d gtk/CellRendererPixbuf.d gtk/CellRendererProgress.d gtk/CellRendererText.d gtk/CellRendererToggle.d gtk/CellView.d gtk/CheckButton.d gtk/CheckMenuItem.d gtk/Clipboard.d gtk/ColorButton.d gtk/ColorSelection.d gtk/ColorSelectionDialog.d gtk/ComboBox.d gtk/ComboBoxEntry.d gtk/Container.d gtk/Curve.d gtk/Dialog.d gtk/DragAndDrop.d gtk/DrawingArea.d gtk/Duit.d gtk/Editable.d gtk/Entry.d gtk/EntryCompletion.d gtk/EventBox.d gtk/Expander.d gtk/FileChooser.d gtk/FileChooserButton.d gtk/FileChooserDialog.d gtk/FileChooserWidget.d gtk/FileFilter.d gtk/FileSelection.d gtk/Fixed.d gtk/FontButton.d gtk/FontSelection.d gtk/FontSelectionDialog.d gtk/Frame.d gtk/GCs.d gtk/GammaCurve.d gtk/HBox.d gtk/HButtonBox.d gtk/HPaned.d gtk/HRuler.d gtk/HScale.d gtk/HScrollbar.d gtk/HSeparator.d gtk/HandleBox.d gtk/IMContext.d gtk/IMContextSimple.d gtk/IMMulticontext.d gtk/IconInfo.d gtk/IconSource.d gtk/IconTheme.d gtk/IconView.d gtk/Idle.d gtk/Image.d gtk/ImageMenuItem.d gtk/InputDialog.d gtk/Invisible.d gtk/Item.d gtk/ItemFactory.d gtk/Label.d gtk/Layout.d gtk/ListStore.d gtk/MainWindow.d gtk/Menu.d gtk/MenuBar.d gtk/MenuItem.d gtk/MenuShell.d gtk/MenuToolButton.d gtk/MessageDialog.d gtk/Misc.d gtk/Notebook.d gtk/ObjectGtk.d gtk/Paned.d gtk/Plug.d gtk/Progress.d gtk/ProgressBar.d gtk/RadioAction.d gtk/RadioButton.d gtk/RadioMenuItem.d gtk/RadioToolButton.d gtk/Range.d gtk/RcStyle.d gtk/Ruler.d gtk/Scale.d gtk/Scrollbar.d gtk/ScrolledWindow.d gtk/Selections.d gtk/Separator.d gtk/SeparatorMenuItem.d gtk/SeparatorToolItem.d gtk/Settings.d gtk/Signals.d gtk/SizeGroup.d gtk/Socket.d gtk/SpinButton.d gtk/StandardEnumerations.d gtk/Statusbar.d gtk/StockItem.d gtk/Style.d gtk/Table.d gtk/TearoffMenuItem.d gtk/TextAttributes.d gtk/TextBuffer.d gtk/TextChildAnchor.d gtk/TextIter.d gtk/TextMark.d gtk/TextTag.d gtk/TextTagTable.d gtk/TextView.d gtk/Timeout.d gtk/ToggleAction.d gtk/ToggleButton.d gtk/ToggleToolButton.d gtk/ToolButton.d gtk/ToolItem.d gtk/Toolbar.d gtk/Tooltips.d gtk/TreeDragSource.d gtk/TreeIter.d gtk/TreeModel.d gtk/TreeModelFilter.d gtk/TreeModelSort.d gtk/TreeNode.d gtk/TreePath.d gtk/TreeRowReference.d gtk/TreeSelection.d gtk/TreeSortable.d gtk/TreeStore.d gtk/TreeView.d gtk/TreeViewColumn.d gtk/Types.d gtk/UIManager.d gtk/VBox.d gtk/VButtonBox.d gtk/VPaned.d gtk/VRuler.d gtk/VScale.d gtk/VScrollbar.d gtk/VSeparator.d gtk/Version.d gtk/Viewport.d gtk/Widget.d gtk/Window.d gtk/WindowGroup.d gtk/typedefs.d lib/Loader.d lib/paths.d lib/gtk.d -I/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos:/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos -c -gc -od/home/ruimt/devel/D1/Duit/obj/src -op wc src/*/*.d 165810 715148 5459708 total wc src/gtk/*.d 75926 312346 2279989 total but mostly comments This is a big problem for D that Walter chooses to attribute low priority. Ant |
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote:
>
> linux 0.148 wait, let me grad 149... yep some with 149
should be "linux 0.148 wait, let me grab 149... yep same with 149"
:p
|
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote:
>
> the interesting thing is that I had a
> private import std.c.stdio;
> in one module that would supply std.string to a bunch of other modules
>
even more interesting now that I removed the std.c.stdio from
that one module and added the std.string where it was missing
my Duit lib is screwed up :(
Ant
|
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | Ant wrote:
> Walter, we still have:
>
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>
>
> these are both private import std.string;
>
> the interesting thing is that I had a
> private import std.c.stdio;
> in one module that would supply std.string to a bunch of other modules
>
> well, I know you cannot do anything about this
> and I know I cannot reduce this problem... but it's better than 2 year
> ago! :)
I think the problem is that DMD tries to be more intelligent than it really is. It saves the private symbols in the symbol table too, but is unable to hide them, when a public one should "mask" them. Another problem is that when the same module is imported using two different "routes", DMD is unable to determine, whether these modules are the same ones.
|
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Ant | On Wed, 08 Mar 2006 21:39:34 +0000, Ant <duitoolkit@yahoo.ca> wrote:
> Regan Heath wrote:
>> On Wed, 08 Mar 2006 19:35:22 +0000, Ant <duitoolkit@yahoo.ca> wrote:
>>> Walter, we still have:
>>>
>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>
>>>
>>> these are both private import std.string;
>>>
>>> the interesting thing is that I had a
>>> private import std.c.stdio;
>>> in one module that would supply std.string to a bunch of other modules
>>>
>>> well, I know you cannot do anything about this
>>> and I know I cannot reduce this problem... but it's better than 2 year ago! :)
>> If you post the code here someone else might have a go at reducing it.
>> Regan
>
> :) !
>
> linux 0.148 wait, let me grad 149... yep some with 149
>
> grab http://svn.dsource.org/projects/dui/trunk/src
>
> move the imports in src/gtk/TextBuffer.d to the module level
> private import std.stdarg;
> private import std.string;
>
> from the src dir compile the duitGtk lib with (change the absolute dirs at the end):
>
> dmd gtk/AboutDialog.d gtk/AccelGroup.d gtk/AccelLabel.d gtk/AccelMap.d gtk/Accessible.d gtk/Action.d gtk/ActionGroup.d gtk/Adjustment.d gtk/Alignment.d gtk/Arrow.d gtk/AspectFrame.d gtk/Bin.d gtk/BindingSet.d gtk/Box.d gtk/Button.d gtk/ButtonBox.d gtk/Calendar.d gtk/CellEditable.d gtk/CellLayout.d gtk/CellRenderer.d gtk/CellRendererCombo.d gtk/CellRendererPixbuf.d gtk/CellRendererProgress.d gtk/CellRendererText.d gtk/CellRendererToggle.d gtk/CellView.d gtk/CheckButton.d gtk/CheckMenuItem.d gtk/Clipboard.d gtk/ColorButton.d gtk/ColorSelection.d gtk/ColorSelectionDialog.d gtk/ComboBox.d gtk/ComboBoxEntry.d gtk/Container.d gtk/Curve.d gtk/Dialog.d gtk/DragAndDrop.d gtk/DrawingArea.d gtk/Duit.d gtk/Editable.d gtk/Entry.d gtk/EntryCompletion.d gtk/EventBox.d gtk/Expander.d gtk/FileChooser.d gtk/FileChooserButton.d gtk/FileChooserDialog.d gtk/FileChooserWidget.d gtk/FileFilter.d gtk/FileSelection.d gtk/Fixed.d gtk/FontButton.d gtk/FontSelection.d gtk/FontSelectionDialog.d gtk/Frame.d gtk/GCs.d gtk/GammaCurve.d gtk/HBox.d gtk/HButtonBox.d gtk/HPaned.d gtk/HRuler.d gtk/HScale.d gtk/HScrollbar.d gtk/HSeparator.d gtk/HandleBox.d gtk/IMContext.d gtk/IMContextSimple.d gtk/IMMulticontext.d gtk/IconInfo.d gtk/IconSource.d gtk/IconTheme.d gtk/IconView.d gtk/Idle.d gtk/Image.d gtk/ImageMenuItem.d gtk/InputDialog.d gtk/Invisible.d gtk/Item.d gtk/ItemFactory.d gtk/Label.d gtk/Layout.d gtk/ListStore.d gtk/MainWindow.d gtk/Menu.d gtk/MenuBar.d gtk/MenuItem.d gtk/MenuShell.d gtk/MenuToolButton.d gtk/MessageDialog.d gtk/Misc.d gtk/Notebook.d gtk/ObjectGtk.d gtk/Paned.d gtk/Plug.d gtk/Progress.d gtk/ProgressBar.d gtk/RadioAction.d gtk/RadioButton.d gtk/RadioMenuItem.d gtk/RadioToolButton.d gtk/Range.d gtk/RcStyle.d gtk/Ruler.d gtk/Scale.d gtk/Scrollbar.d gtk/ScrolledWindow.d gtk/Selections.d gtk/Separator.d gtk/SeparatorMenuItem.d gtk/SeparatorToolItem.d gtk/Settings.d gtk/Signals.d gtk/SizeGroup.d gtk/Socket.d gtk/SpinButton.d gtk/StandardEnumerations.d gtk/Statusbar.d gtk/StockItem.d gtk/Style.d gtk/Table.d gtk/TearoffMenuItem.d gtk/TextAttributes.d gtk/TextBuffer.d gtk/TextChildAnchor.d gtk/TextIter.d gtk/TextMark.d gtk/TextTag.d gtk/TextTagTable.d gtk/TextView.d gtk/Timeout.d gtk/ToggleAction.d gtk/ToggleButton.d gtk/ToggleToolButton.d gtk/ToolButton.d gtk/ToolItem.d gtk/Toolbar.d gtk/Tooltips.d gtk/TreeDragSource.d gtk/TreeIter.d gtk/TreeModel.d gtk/TreeModelFilter.d gtk/TreeModelSort.d gtk/TreeNode.d gtk/TreePath.d gtk/TreeRowReference.d gtk/TreeSelection.d gtk/TreeSortable.d gtk/TreeStore.d gtk/TreeView.d gtk/TreeViewColumn.d gtk/Types.d gtk/UIManager.d gtk/VBox.d gtk/VButtonBox.d gtk/VPaned.d gtk/VRuler.d gtk/VScale.d gtk/VScrollbar.d gtk/VSeparator.d gtk/Version.d gtk/Viewport.d gtk/Widget.d gtk/Window.d gtk/WindowGroup.d gtk/typedefs.d lib/Loader.d lib/paths.d lib/gtk.d -I/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos:/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos -c -gc -od/home/ruimt/devel/D1/Duit/obj/src -op
>
>
> wc src/*/*.d
> 165810 715148 5459708 total
>
> wc src/gtk/*.d
> 75926 312346 2279989 total
>
> but mostly comments
>
> This is a big problem for D that Walter chooses to attribute low priority.
I believe Walter discourages the use of import inside a class and I believe your use of them is the reason for the problem.
For example, if you move all the imports within these 3 files to the module level:
gobject/ObjectG.d
gtk/TextBuffer.d
gtk/TextChildAnchor.d
the errors vanish.. of course it results in different errors, most of which can be resolved by adding:
private import std.string;
to the files which use std.string.toString.
Regan
|
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | On Thu, 09 Mar 2006 22:25:49 +1300, Regan Heath <regan@netwin.co.nz> wrote:
> On Wed, 08 Mar 2006 21:39:34 +0000, Ant <duitoolkit@yahoo.ca> wrote:
>> Regan Heath wrote:
>>> On Wed, 08 Mar 2006 19:35:22 +0000, Ant <duitoolkit@yahoo.ca> wrote:
>>>> Walter, we still have:
>>>>
>>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>>>
>>>>
>>>> these are both private import std.string;
>>>>
>>>> the interesting thing is that I had a
>>>> private import std.c.stdio;
>>>> in one module that would supply std.string to a bunch of other modules
>>>>
>>>> well, I know you cannot do anything about this
>>>> and I know I cannot reduce this problem... but it's better than 2 year ago! :)
>>> If you post the code here someone else might have a go at reducing it.
>>> Regan
>>
>> :) !
>>
>> linux 0.148 wait, let me grad 149... yep some with 149
>>
>> grab http://svn.dsource.org/projects/dui/trunk/src
>>
>> move the imports in src/gtk/TextBuffer.d to the module level
>> private import std.stdarg;
>> private import std.string;
>>
>> from the src dir compile the duitGtk lib with (change the absolute dirs at the end):
>>
>> dmd gtk/AboutDialog.d gtk/AccelGroup.d gtk/AccelLabel.d gtk/AccelMap.d gtk/Accessible.d gtk/Action.d gtk/ActionGroup.d gtk/Adjustment.d gtk/Alignment.d gtk/Arrow.d gtk/AspectFrame.d gtk/Bin.d gtk/BindingSet.d gtk/Box.d gtk/Button.d gtk/ButtonBox.d gtk/Calendar.d gtk/CellEditable.d gtk/CellLayout.d gtk/CellRenderer.d gtk/CellRendererCombo.d gtk/CellRendererPixbuf.d gtk/CellRendererProgress.d gtk/CellRendererText.d gtk/CellRendererToggle.d gtk/CellView.d gtk/CheckButton.d gtk/CheckMenuItem.d gtk/Clipboard.d gtk/ColorButton.d gtk/ColorSelection.d gtk/ColorSelectionDialog.d gtk/ComboBox.d gtk/ComboBoxEntry.d gtk/Container.d gtk/Curve.d gtk/Dialog.d gtk/DragAndDrop.d gtk/DrawingArea.d gtk/Duit.d gtk/Editable.d gtk/Entry.d gtk/EntryCompletion.d gtk/EventBox.d gtk/Expander.d gtk/FileChooser.d gtk/FileChooserButton.d gtk/FileChooserDialog.d gtk/FileChooserWidget.d gtk/FileFilter.d gtk/FileSelection.d gtk/Fixed.d gtk/FontButton.d gtk/FontSelection.d gtk/FontSelectionDialog.d gtk/Frame.d gtk/GCs.d gtk/GammaCurve.d gtk/HBox.d gtk/HButtonBox.d gtk/HPaned.d gtk/HRuler.d gtk/HScale.d gtk/HScrollbar.d gtk/HSeparator.d gtk/HandleBox.d gtk/IMContext.d gtk/IMContextSimple.d gtk/IMMulticontext.d gtk/IconInfo.d gtk/IconSource.d gtk/IconTheme.d gtk/IconView.d gtk/Idle.d gtk/Image.d gtk/ImageMenuItem.d gtk/InputDialog.d gtk/Invisible.d gtk/Item.d gtk/ItemFactory.d gtk/Label.d gtk/Layout.d gtk/ListStore.d gtk/MainWindow.d gtk/Menu.d gtk/MenuBar.d gtk/MenuItem.d gtk/MenuShell.d gtk/MenuToolButton.d gtk/MessageDialog.d gtk/Misc.d gtk/Notebook.d gtk/ObjectGtk.d gtk/Paned.d gtk/Plug.d gtk/Progress.d gtk/ProgressBar.d gtk/RadioAction.d gtk/RadioButton.d gtk/RadioMenuItem.d gtk/RadioToolButton.d gtk/Range.d gtk/RcStyle.d gtk/Ruler.d gtk/Scale.d gtk/Scrollbar.d gtk/ScrolledWindow.d gtk/Selections.d gtk/Separator.d gtk/SeparatorMenuItem.d gtk/SeparatorToolItem.d gtk/Settings.d gtk/Signals.d gtk/SizeGroup.d gtk/Socket.d gtk/SpinButton.d gtk/StandardEnumerations.d gtk/Statusbar.d gtk/StockItem.d gtk/Style.d gtk/Table.d gtk/TearoffMenuItem.d gtk/TextAttributes.d gtk/TextBuffer.d gtk/TextChildAnchor.d gtk/TextIter.d gtk/TextMark.d gtk/TextTag.d gtk/TextTagTable.d gtk/TextView.d gtk/Timeout.d gtk/ToggleAction.d gtk/ToggleButton.d gtk/ToggleToolButton.d gtk/ToolButton.d gtk/ToolItem.d gtk/Toolbar.d gtk/Tooltips.d gtk/TreeDragSource.d gtk/TreeIter.d gtk/TreeModel.d gtk/TreeModelFilter.d gtk/TreeModelSort.d gtk/TreeNode.d gtk/TreePath.d gtk/TreeRowReference.d gtk/TreeSelection.d gtk/TreeSortable.d gtk/TreeStore.d gtk/TreeView.d gtk/TreeViewColumn.d gtk/Types.d gtk/UIManager.d gtk/VBox.d gtk/VButtonBox.d gtk/VPaned.d gtk/VRuler.d gtk/VScale.d gtk/VScrollbar.d gtk/VSeparator.d gtk/Version.d gtk/Viewport.d gtk/Widget.d gtk/Window.d gtk/WindowGroup.d gtk/typedefs.d lib/Loader.d lib/paths.d lib/gtk.d -I/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos:/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos -c -gc -od/home/ruimt/devel/D1/Duit/obj/src -op
>>
>>
>> wc src/*/*.d
>> 165810 715148 5459708 total
>>
>> wc src/gtk/*.d
>> 75926 312346 2279989 total
>>
>> but mostly comments
>>
>> This is a big problem for D that Walter chooses to attribute low priority.
>
> I believe Walter discourages the use of import inside a class and I believe your use of them is the reason for the problem.
>
> For example, if you move all the imports within these 3 files to the module level:
> gobject/ObjectG.d
> gtk/TextBuffer.d
> gtk/TextChildAnchor.d
>
> the errors vanish.. of course it results in different errors, most of which can be resolved by adding:
> private import std.string;
>
> to the files which use std.string.toString.
I tried compiling on windows.. and it compiles with no errors. Odd. I was hoping to get the same error on windows so I could produce a minimal test case. Sorry I can't be of more help.
Regan
|
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Regan Heath | Regan Heath wrote: > On Wed, 08 Mar 2006 21:39:34 +0000, Ant <duitoolkit@yahoo.ca> wrote: >> Regan Heath wrote: >>> On Wed, 08 Mar 2006 19:35:22 +0000, Ant <duitoolkit@yahoo.ca> wrote: >>>> Walter, we still have: >>>> >>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >>>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46) >>>> >>>> >>>> these are both private import std.string; >>>> >>>> the interesting thing is that I had a >>>> private import std.c.stdio; >>>> in one module that would supply std.string to a bunch of other modules >>>> >>>> well, I know you cannot do anything about this >>>> and I know I cannot reduce this problem... but it's better than 2 year ago! :) >>> If you post the code here someone else might have a go at reducing it. >>> Regan >> >> :) ! >> >> linux 0.148 wait, let me grad 149... yep some with 149 >> >> grab http://svn.dsource.org/projects/dui/trunk/src >> >> move the imports in src/gtk/TextBuffer.d to the module level >> private import std.stdarg; >> private import std.string; >> >> from the src dir compile the duitGtk lib with (change the absolute dirs at the end): >> >> dmd gtk/AboutDialog.d gtk/AccelGroup.d gtk/AccelLabel.d gtk/AccelMap.d gtk/Accessible.d gtk/Action.d gtk/ActionGroup.d gtk/Adjustment.d gtk/Alignment.d gtk/Arrow.d gtk/AspectFrame.d gtk/Bin.d gtk/BindingSet.d gtk/Box.d gtk/Button.d gtk/ButtonBox.d gtk/Calendar.d gtk/CellEditable.d gtk/CellLayout.d gtk/CellRenderer.d gtk/CellRendererCombo.d gtk/CellRendererPixbuf.d gtk/CellRendererProgress.d gtk/CellRendererText.d gtk/CellRendererToggle.d gtk/CellView.d gtk/CheckButton.d gtk/CheckMenuItem.d gtk/Clipboard.d gtk/ColorButton.d gtk/ColorSelection.d gtk/ColorSelectionDialog.d gtk/ComboBox.d gtk/ComboBoxEntry.d gtk/Container.d gtk/Curve.d gtk/Dialog.d gtk/DragAndDrop.d gtk/DrawingArea.d gtk/Duit.d gtk/Editable.d gtk/Entry.d gtk/EntryCompletion.d gtk/EventBox.d gtk/Expander.d gtk/FileChooser.d gtk/FileChooserButton.d gtk/FileChooserDialog.d gtk/FileChooserWidget.d gtk/FileFilter.d gtk/FileSelection.d gtk/Fixed.d gtk/FontButton.d gtk/FontSelection.d gtk/FontSelectionDialog.d gtk/Frame.d gtk/GCs.d gtk/GammaCurve.d gtk/HBox.d gtk/HButtonBox.d gtk/HPaned.d gtk/HRuler.d gtk/HScale.d gtk/HScrollbar.d gtk/HSeparator.d gtk/HandleBox.d gtk/IMContext.d gtk/IMContextSimple.d gtk/IMMulticontext.d gtk/IconInfo.d gtk/IconSource.d gtk/IconTheme.d gtk/IconView.d gtk/Idle.d gtk/Image.d gtk/ImageMenuItem.d gtk/InputDialog.d gtk/Invisible.d gtk/Item.d gtk/ItemFactory.d gtk/Label.d gtk/Layout.d gtk/ListStore.d gtk/MainWindow.d gtk/Menu.d gtk/MenuBar.d gtk/MenuItem.d gtk/MenuShell.d gtk/MenuToolButton.d gtk/MessageDialog.d gtk/Misc.d gtk/Notebook.d gtk/ObjectGtk.d gtk/Paned.d gtk/Plug.d gtk/Progress.d gtk/ProgressBar.d gtk/RadioAction.d gtk/RadioButton.d gtk/RadioMenuItem.d gtk/RadioToolButton.d gtk/Range.d gtk/RcStyle.d gtk/Ruler.d gtk/Scale.d gtk/Scrollbar.d gtk/ScrolledWindow.d gtk/Selections.d gtk/Separator.d gtk/SeparatorMenuItem.d gtk/SeparatorToolItem.d gtk/Settings.d gtk/Signals.d gtk/SizeGroup.d gtk/Socket.d gtk/SpinButton.d gtk/StandardEnumerations.d gtk/Statusbar.d gtk/StockItem.d gtk/Style.d gtk/Table.d gtk/TearoffMenuItem.d gtk/TextAttributes.d gtk/TextBuffer.d gtk/TextChildAnchor.d gtk/TextIter.d gtk/TextMark.d gtk/TextTag.d gtk/TextTagTable.d gtk/TextView.d gtk/Timeout.d gtk/ToggleAction.d gtk/ToggleButton.d gtk/ToggleToolButton.d gtk/ToolButton.d gtk/ToolItem.d gtk/Toolbar.d gtk/Tooltips.d gtk/TreeDragSource.d gtk/TreeIter.d gtk/TreeModel.d gtk/TreeModelFilter.d gtk/TreeModelSort.d gtk/TreeNode.d gtk/TreePath.d gtk/TreeRowReference.d gtk/TreeSelection.d gtk/TreeSortable.d gtk/TreeStore.d gtk/TreeView.d gtk/TreeViewColumn.d gtk/Types.d gtk/UIManager.d gtk/VBox.d gtk/VButtonBox.d gtk/VPaned.d gtk/VRuler.d gtk/VScale.d gtk/VScrollbar.d gtk/VSeparator.d gtk/Version.d gtk/Viewport.d gtk/Widget.d gtk/Window.d gtk/WindowGroup.d gtk/typedefs.d lib/Loader.d lib/paths.d lib/gtk.d -I/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos:/home/ruimt/devel/D1/Duit/src:/home/ruimt/dmd/src/phobos -c -gc -od/home/ruimt/devel/D1/Duit/obj/src -op >> >> >> wc src/*/*.d >> 165810 715148 5459708 total >> >> wc src/gtk/*.d >> 75926 312346 2279989 total >> >> but mostly comments >> >> This is a big problem for D that Walter chooses to attribute low priority. > > I believe Walter discourages the use of import inside a class and I believe your use of them is the reason for the problem. but don't you agree the "discourage" should be banned? either is valid or not. > > For example, if you move all the imports within these 3 files to the module level: > gobject/ObjectG.d > gtk/TextBuffer.d > gtk/TextChildAnchor.d > > the errors vanish.. of course it results in different errors, most of which can be resolved by adding: > private import std.string; > > to the files which use std.string.toString. > Thank you! I'll review all my imports. Ant |
March 09, 2006 Re: imports - 2 years later | ||||
---|---|---|---|---|
| ||||
Posted in reply to Jari-Matti Mäkelä | Jari-Matti Mäkelä wrote:
> Ant wrote:
>> Walter, we still have:
>>
>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
>> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
>> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
>> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
>> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
>> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>> gtk/TextBuffer.d(88): import gtk.TextBuffer.std conflicts with
>> gtk.TextChildAnchor.std at gtk/TextChildAnchor.d(46)
>>
>>
>> these are both private import std.string;
>>
>> the interesting thing is that I had a
>> private import std.c.stdio;
>> in one module that would supply std.string to a bunch of other modules
>>
>> well, I know you cannot do anything about this
>> and I know I cannot reduce this problem... but it's better than 2 year
>> ago! :)
>
> I think the problem is that DMD tries to be more intelligent than it
> really is. It saves the private symbols in the symbol table too, but is
> unable to hide them, when a public one should "mask" them. Another
> problem is that when the same module is imported using two different
> "routes", DMD is unable to determine, whether these modules are the same
> ones.
I think that a valid hypotheses clearly explained.
But what matters is what Walter will do about it.
Thank you,
Ant
|
Copyright © 1999-2021 by the D Language Foundation