Skip to content
This repository has been archived by the owner on Sep 6, 2021. It is now read-only.

Remove individual functions deprecated before 0.41 #8992

Merged
merged 5 commits into from
Oct 22, 2014
Merged

Remove individual functions deprecated before 0.41 #8992

merged 5 commits into from
Oct 22, 2014

Conversation

le717
Copy link
Contributor

@le717 le717 commented Sep 5, 2014

More towards #8751.

The following APIs are removed with this PR, listed along side the commit they were deprecated with and the release that deprecation went into effect.

  • FileUtils.canonicalizeFolderPath() (a9ab07c, 0.33)
  • LiveDevelopment/Agents/CSSAgents.getStylesheetURLs() (04b015e, 0.37)
  • LiveDevelopment/Documents/CSSDocument.getStyleSheetFromBrowser() (d2a8a82, 0.37)
  • ProjectManager.isBinaryFile() (0c02184, 0.39)

There is only instance any of these APIs are used, and that is getStylesheetURLs() in the relution.brackets extension by http://www.relution.io/en/, and that is because they have duplicated that module in their extension (possibly with changes just for them).

Commits showing when each function was deprecated.

a9ab07c

0c02184

d2a8a82

04b015e
@le717 le717 changed the title Remove functions deprecated before 0.41 Remove individual functions deprecated before 0.41 Sep 5, 2014
@ingorichter
Copy link
Contributor

If you could file an issue with the Extension author, to give them a heads up, then we could merge this cleanup PR. Thanks.

@le717
Copy link
Contributor Author

le717 commented Oct 2, 2014

The extension home page goes to a professional website, and I didn't see a contact form (but I'll look again), and the removal may not effect it, as it appeared to be in a direct copy of that Brackets module. I'll also check how the module is referenced. If the extension does not pull the module from core but instead from their copy, then removal should not effect it at all.

@le717
Copy link
Contributor Author

le717 commented Oct 2, 2014

@ingorichter I've checked again, the extension is not accessing the getStylesheetURLs() function in Brackets core. Rather, it is contained in a Preview module in the extension and is referenced only within the extension. That module appears to be a combination of various Live Development code they compiled into a single file for their extension (could be so they could gain access to certain private functions). Merging this extension should not break their extension.

If you are ready, I will merge this with master and get it merge-ready again.

@le717
Copy link
Contributor Author

le717 commented Oct 3, 2014

@ingorichter I've contacted the extension author about the use of the deprecated function and updated this with master.

@ingorichter ingorichter self-assigned this Oct 20, 2014
@ingorichter
Copy link
Contributor

LiveDevelopment-test.js is setting up a spy for getStyleSheetFromBrowser. Would you mind removing all the unnecessary code in that test? Thanks.

@le717
Copy link
Contributor Author

le717 commented Oct 21, 2014

@ingorichter Removed.

@le717
Copy link
Contributor Author

le717 commented Oct 21, 2014

Hang on, looks like I removed one too may lines...

@le717
Copy link
Contributor Author

le717 commented Oct 21, 2014

@ingorichter There you go, now it's ready to merge.

@@ -298,10 +298,6 @@ define(function (require, exports, module) {

// document spies
var deferred = new $.Deferred();
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we don't need the deferred here any longer.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's what I thought too, but Travis failed when I removed it because it is referenced in the block at lines 307-320.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I think we can remove the whole block. I did this locally and all the tests passed.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If I understand correctly, remove everything from 299-318?

@ingorichter
Copy link
Contributor

310-322 needs to be removed.

@le717
Copy link
Contributor Author

le717 commented Oct 21, 2014

Hopefully that is the correct code to be removed.

@ingorichter
Copy link
Contributor

:-)

@ingorichter
Copy link
Contributor

Tests pass on my machine. Thanks.

ingorichter added a commit that referenced this pull request Oct 22, 2014
Remove individual functions deprecated before 0.41
@ingorichter ingorichter merged commit dfebd70 into adobe:master Oct 22, 2014
@le717 le717 deleted the remove-some-deprecated branch October 22, 2014 19:03
@peterflynn
Copy link
Member

@le717 Fwiw, I looked at that "relution.brackets" extension and they are actually using the Brackets core API that was removed here -- not their own copy. See line 113 where the value of agents.css is set to an imported core Brackets module. I'll try to see if there's a way to contact them about their extension breaking.

Though fwiw this is another one where we gave extension authors zero warning before deleting the API... :-( We need to be more careful about late-game API removals in the future.

@le717
Copy link
Contributor Author

le717 commented Oct 31, 2014

I sent the author an email via their contact form warning them about this and even linked back to this issue.

Go back in hole because of all the the breakage I've created

@peterflynn
Copy link
Member

@le717 No worries, it's our job to review too!

@peterflynn
Copy link
Member

@stefanbuck & @stefanjauker -- I notice you're associated with 'mwaylabs' on GitHub. Are you part of the team that maintains the "Relution.io Brackets plugin"? Please be aware that the "preview" functionality in this extension will be broken in the next release of Brackets (1.0), due to the API that was removed in this pull request. (@le717 left a note via your online contact form, but I figured I'd ping you here in case that message didn't reach you). Note that Brackets 1.0 will be released in 3-4 days.

@ingorichter
Copy link
Contributor

What a mess... I didn't expect that many issues after the initial assessment. :-(

@stefanjauker
Copy link

@peterflynn Thanks for the hint. We will refactor the plugin on monday.

@peterflynn
Copy link
Member

@stefanjauker That's great, thanks! Sorry for the trouble.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants