Hi Vincent,
I know that I could have used the deprecation mechanism, but I did not want
to carry around useless deprecated methods for an API that nobody used.
There are 2 places where $services.workspace is used (menuview.vm and
rightsUI.vm), but they are not using the createWorkspace method so they
should not care about this change.
That API has been introduced in October 2011 and I am sure it can be
improved. However, if you insist, I can add back the old method signatures
in the script service and the API,mark them as deprecated, and carry them
along, though anyone using them will not get the expected result, since the
workspace name will not be the one requested by the caller. I could do a
check inside the deprecated methods and use the workspaceName parameter if
none was given in the XWikiServer instance (because of old code), and hope
that the caller/user will not be disoriented.
WDYT?
Thanks,
Eduard
On Tue, Feb 5, 2013 at 11:35 AM, Vincent Massol <vincent(a)massol.net> wrote:
Hi Edy,
On Feb 4, 2013, at 7:47 PM, Eduard Moraru <enygma2002(a)gmail.com> wrote:
Hi devs,
I`ve just pushed (to master and stable-4.4.x) a fix for a workspace bug
[1]
that caused problems when a workspace name/ID
contained an underscore. I
am
mentioning this because the fix required, in
order for it to be a proper
fix, that I do a clirr violation (remove the wikiName parameter from the
createWorkspace method because it was misleading).
Since this API is not used in any XWiki module that I know of, not in any
third party code either (correct me if I`m wrong), I think that the clirr
exclusion will not create new issues.
Just wanted to mention it. If someone does not agree with this decision,
please let me know so that we can make a better one.
Seems good to reuse the wiki name from the XWikiServer object.
Now let's hope that nobody was using that API (it's a pretty high level
and important API and it's not a new API - dates back from April 2011, i.e.
almost 2 years ago…).
A safer solution could have been to allow passing null as the first
parameter in which case the name from XWikiServer would be used and
otherwise the passed name would override the XWikiServer name. And then in
the future (in 5.0 for ex), deprecate and add a new signature.
However I'm not sure I agree with breaking the Script Service… Why cause
an unnecessary breakage?
Why not simply deprecate the signature with the String as first param and
add new signatures?
BTW are you saying that the script service is not used by any wiki page of
ours?
Thanks
-Vincent
_______________________________________________
devs mailing list
devs(a)xwiki.org
http://lists.xwiki.org/mailman/listinfo/devs