-
Notifications
You must be signed in to change notification settings - Fork 7.6k
[WIP] Introduce FilePathUtils module #10600
Conversation
I suggested moving them to |
I've moved
Let me know what you want me to do. Also, just a thought: what would you say to moving the FilePathUtils to the src/utils folder with the other modules that are classified as utils? it is one of the few utils modules that are not in that folder, and once the old FileSystem code is removed, only FileUtils and FilePathUtils will be in src/file. |
It sounds like
Yes, I think that |
Moving |
This seems more disruptive than it needs to be. Couldn't we also break the circular dependency by just doing this:
During the deprecation phase, the cycle would persist of course, but after that it would go away. The other cleanups seems separable, but could be incorporated here optionally:
It's not the cleanest thing in the world having a mix of utilities that work with paths vs. file contents in one module, but IMHO it's not a nasty enough issue to warrant deprecating over a dozen APIs some of which are probably used in a ton of extensions. |
In the back of my head I've been thinking the same thing, as I've been getting a ton of warnings from this branch with the 20 extensions I've installed, many from very common extensions. A new module might have made sense when the issue was filed, but probably not now.
I'm thinking so, yes, provided |
Thinking about it a bit more, here are some possible ideas:
Thoughts? |
I like these.
Perhaps if there are other error dialogs that can be easily relocated, an
Since future plans may effect this, I would go for making just these changes and filing a backlog card with extensibility ideas. |
@le717 Sounds good to me. Re the dialog, I guess there are actually two options:
|
Since making a whole new FilePathUtils module is too drastic to fix the issues, I've spun off the new changes to #10641 and am closing this. |
Part of #7631.
This introduces a new
FilePathUtils
module, which moves many APIs from theFileUtils
in an attempt to resolve some of the circular dependencies.LanguageManager
andFileUtils
, with only the latter using the former.FileUtils.getSmartFileExtension()
has yet to be moved, as it relies onLanguageManager.getLanguageForExtension()
, which just moves the circle to a different module. This will need to be worked out before merging.FileUtils.isStaticHtmlFileExt()
andFileUtils.isServerHtmlFileExt()
toLanguageManager
will create a circular dependency between it andFilePathUtils
during deprecation unless it is flat-out moved without redirect.I'm mainly posting this now to get feedback, review what stays in
FileUtils
and what is moved toFilePathUtils
, and resolve any remaining issues./cc @redmunds