Opened 13 years ago

Closed 13 years ago

Last modified 12 years ago

#1089 closed task (fixed)

Remove deprecated items for 0.4

Reported by: Dustin Machi Owned by: Bryan Forbes
Priority: high Milestone:
Component: General Version: 0.3
Keywords: Cc:
Blocked By: Blocking:

Description (last modified by Dustin Machi)

Its time to remove the deprecated items that are scheduled to be removed for 0.4. Here is a grepped list of them Here is a list of things that are marked as deprecated:

dmachi@mastodon:~/public_html> find dojo-trunk/src/ ( -type d -name ".svn" -prune ) -o -exec grep -H "dojo.deprecate" {} ;
dojo-trunk/src/fx/html.js:dojo.deprecated("dojo.fx.html", "use dojo.lfx.html instead", "0.4");
dojo-trunk/src/io/BrowserIO.js:        dojo.deprecated("Using dojo.io.XMLHTTPTransport.bind() to add to browser history without doing an IO request",
dojo-trunk/src/io/cookies.js:dojo.deprecated("dojo.io.cookies", "replaced by dojo.io.cookie", "0.4");
dojo-trunk/src/uri/Uri.js:              dojo.deprecated("dojo.uri.joinPath", "use the dojo.uri.Uri object instead", "0.4");
dojo-trunk/src/xml/domUtil.js:dojo.deprecated("dojo.xml.domUtil", "use dojo.dom instead", "0.4");
dojo-trunk/src/xml/htmlUtil.js:dojo.deprecated("dojo.xml.htmlUtil", "use dojo.html instead", "0.4");
dojo-trunk/src/xml/htmlUtil.js:         dojo.deprecated("dojo.xml.htmlUtil.getAttr", "use dojo.xml.htmlUtil.getAttribute instead", "0.4");
dojo-trunk/src/xml/htmlUtil.js:         dojo.deprecated("dojo.xml.htmlUtil.hasAttr", "use dojo.xml.htmlUtil.hasAttribute instead", "0.4");
dojo-trunk/src/xml/htmlUtil.js:         dojo.deprecated("dojo.xml.htmlUtil.insertCSSRule", "use dojo.style.insertCssRule instead", "0.4");
dojo-trunk/src/xml/htmlUtil.js:         dojo.deprecated("dojo.xml.htmlUtil.removeCSSRule", "use dojo.xml.htmlUtil.removeCssRule instead", "0.4");
dojo-trunk/src/xml/htmlUtil.js:         dojo.deprecated("dojo.xml.htmlUtil.insertCSSFile", "use dojo.xml.htmlUtil.insertCssFile instead", "0.4");
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.toString",
dojo-trunk/src/date.js: dojo.deprecated("daysInMonth(month, year)",
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.toLongDateString",
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.toShortDateString",
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.toMilitaryTimeString",
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.getDayOfWeekName",
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.getShortDayOfWeekName",
dojo-trunk/src/date.js: dojo.deprecated("dojo.date.getShortMonthName",
dojo-trunk/src/lang/repr.js:    dojo.deprecated("dojo.lang.reprNumber", "use `String(num)` instead", "0.4");
dojo-trunk/src/lang/repr.js:    dojo.deprecated("dojo.lang.reprNumber", "use `String(num)` instead", "0.4");
dojo-trunk/src/lang/Lang.js:dojo.deprecated("dojo.lang.Lang", "use dojo.lang instead", "0.4");
dojo-trunk/src/math/Math.js:dojo.deprecated("dojo.math.Math", "include dojo.math instead", "0.4");
dojo-trunk/src/text/Builder.js:dojo.deprecated("dojo.text.Builder", "use dojo.string.Builder instead", "0.4");
dojo-trunk/src/text/Text.js:dojo.deprecated("dojo.text.Text", "replaced by dojo.string", "0.4");
dojo-trunk/src/text/String.js:dojo.deprecated("dojo.text.String", "replaced by dojo.string", "0.4");
dojo-trunk/src/style.js:                dojo.deprecated('dojo.(style|html).getNumericStyle', 'in favor of dojo.(style|html).getPixelValue', '0.4');
dojo-trunk/src/reflect/__package__.js:dojo.deprecated("dojo.reflect", "merged into dojo.lang (dojo.lang[type]).", "0.4");
dojo-trunk/src/reflect/reflection.js:dojo.deprecated("dojo.reflect", "merged into dojo.lang (dojo.lang[type])", "0.4");
dojo-trunk/src/json.js:         dojo.deprecated("dojo.json.evalJSON", "use dojo.json.evalJson", "0.4");
dojo-trunk/src/compat/0.2.2.js: dojo.deprecated("dj_throw and dj_rethrow", "use dojo.raise instead", "0.4");
dojo-trunk/src/compat/0.2.2.js:dj_deprecated = dojo.deprecated;
dojo-trunk/src/compat/0.2.2.js: dojo.deprecated("dj_inherits", "use dojo.inherits instead", "0.4");
dojo-trunk/src/dom.js:  dojo.deprecated("dojo.dom.getTagName", "use node.tagName instead", "0.4");
dojo-trunk/src/dom.js:  dojo.deprecated("dojo.dom.collectionToArray", "use dojo.lang.toArray instead", "0.4");
dojo-trunk/src/bootstrap1.js:dojo.deprecated = function(/*String*/ behaviour, /*String?*/ extra, /*String?*/ removal){
dojo-trunk/src/string/extras.js:        dojo.deprecated("dojo.string.paramString",
dojo-trunk/src/widget/Parse.js:         dojo.deprecated("dojo.widget.createWidget", 
dojo-trunk/src/widget/Parse.js: dojo.deprecated("dojo.widget.fromScript", " use " +
dojo-trunk/src/widget/Manager.js:               dojo.deprecated("getWidgetsOfType", "use getWidgetsByType", "0.4");
dojo-trunk/src/widget/DomWidget.js:             dojo.deprecated("templatePath should be of type dojo.uri.Uri", null, "0.4");
dojo-trunk/src/widget/DomWidget.js:             dojo.deprecated("templateCssPath should be of type dojo.uri.Uri", null, "0.4");
dojo-trunk/src/widget/SimpleDropdownButtons.js:dojo.deprecated("dojo.widget.SimpleDropdownButtons",  "use dojo.widget.DropDownButton", "0.4");
dojo-trunk/src/widget/PopUpButton.js:dojo.deprecated("dojo.widget.PopUpButton, dojo.widget.DomPopUpButton, dojo.widget.HtmlPopUpButton",  "use dojo.widget.DropDownButton", "0.4");
dojo-trunk/src/widget/DropdownButton.js:dojo.deprecated("dojo.widget.DropdownButton",  "use dojo.widget.ComboButton", "0.4");
dojo-trunk/src/widget/Menu.js:dojo.deprecated("dojo.widget.Menu, dojo.widget.DomMenu",  "use dojo.widget.Menu2", "0.4");
dojo-trunk/src/widget/ContextMenu.js:dojo.deprecated("dojo.widget.ContextMenu",  "use dojo.widget.Menu2", "0.4");
dojo-trunk/src/widget/MenuItem.js:dojo.deprecated("dojo.widget.MenuItem, dojo.widget.DomMenuItem",  "use dojo.widget.Menu2", "0.4");
dojo-trunk/src/html.js: dojo.deprecated("dojo.html.getDocument*", "replaced by dojo.html.getViewport*", "0.4");
dojo-trunk/src/html.js: dojo.deprecated("dojo.html.getDocument*", "replaced by dojo.html.getViewport*", "0.4");
dojo-trunk/src/html.js: dojo.deprecated("dojo.html.getDocument*", "replaced of dojo.html.getViewport*", "0.4");
dojo-trunk/src/html.js: dojo.deprecated("dojo.html.getParentOfType", "replaced by dojo.html.getParentByType*", "0.4");
dojo-trunk/src/html.js: dojo.deprecated("dojo.html.body() moved to dojo.body()", "0.5");
dojo-trunk/src/html.js: dojo.deprecated("dojo.html." + inFunc, "moved to " + module, "0.4");

Change History (11)

comment:1 Changed 13 years ago by Dustin Machi

Description: modified (diff)

comment:2 Changed 13 years ago by Dustin Machi

Milestone: 0.4
Priority: normalhigh
Version: 0.20.3

comment:3 Changed 13 years ago by Dustin Machi

Summary: Remove deprecated items for 0.4 and move to compat packageRemove deprecated items for 0.4

comment:4 Changed 13 years ago by James Burke

The functions in src/compat/0.2.2.js should not removed (the point of that package is to provide compatibility support for deprecated items). However, the dojo.deprecated() calls might be removed? If the user wants the compatibility package, I suppose we can assume they know the items are deprecated. OTOH, it might be a nice reminder that they are still relying on a crutch, and should update at some point.

comment:5 Changed 13 years ago by bill

Dojo's policy is to deprecate stuff for one release and then remove it. Is there any reason that those functions should be special?

The reason we made a separate file is only because it suddenly seemed urgent to quickly reduce the size of the bootstrap, so we didn't want to wait until the 0.4 release to remove those functions from bootstrap1.js

comment:6 Changed 13 years ago by James Burke

I suppose we should flesh out the definition of the compat packages better. I can see where instead of deprecating and then removing the methods, the compat packages allow us to remove the methods from the main source immediately, but allow apps that still depend on them to change a djConfig parameter to get the old support.

I'm not sure that means we ever need to remove the compat packages, but perhaps we only guarantee they will work for one release, and after that, it is "use at your own risk".

For that to really work though, we would need to do a little more work with how to get the compat packages to define the methods after a given package has been loaded.

So I'm fine with just removing the methods altogether, but it would be good to get a clear definition of the purposes of the compat packages first, and make sure the lists know about it. We should also decide if we are going to use compat packages instead of leaving the deprecated methods in the source files and using dojo.deprecated() calls to flag them.

Personally, I vote for using the compat packages and removing the methods from source immediately and putting them in the compat packages, figuring out how the compat packages can define the methods at the right time, and then keeping the compat packages around for a few releases, but only guaranteeing they will work for one release. But it is not something I feel strongly about. Just laying something out to start the conversation.

comment:7 Changed 13 years ago by bill

(quoting from Dustin)

We discussed deprecation and the compat packages at yesterday's irc meeting. The consensus was to remove the compat packages altogether, and follow our traditional strategy for deprecation. This means something normally available in 0.3 can get deprecated for 0.4 and then will be gone in 0.5. The compat packages will be removed altogether.

comment:8 Changed 13 years ago by dylan

Owner: changed from anonymous to Bryan Forbes

comment:9 Changed 13 years ago by tk

Resolution: fixed
Status: newclosed

Just an update, I just grep'd my local src tree (updated just prior) and here what was left from the above list of deprecations:

data/SimpleStore.js:dojo.deprecated("dojo.data.SimpleStore has been moved to dojo.collections.Store and will be removed before the 0.4 release", "0.4"); uri/Uri.js: dojo.deprecated("dojo.uri.nsUri", "replaced by dojo.uri.moduleUri", "0.4"); widget/DomWidget.js: dojo.deprecated("templatePath should be of type dojo.uri.Uri", null, "0.4"); widget/DomWidget.js: dojo.deprecated("templateCssPath should be of type dojo.uri.Uri", null, "0.4");

They are now removed!

closed as of r5760

comment:10 Changed 13 years ago by tk

ugh, I overlooked the compat/ notes above, r5761 removes /compat/*

comment:11 Changed 12 years ago by (none)

Milestone: 0.4

Milestone 0.4 deleted

Note: See TracTickets for help on using tickets.