Re: [racket-users] refactoring help/tools?

2017-03-23 Thread Daniel Feltey
For those not tracking the DrRacket github repo, this feature is now available in the Racket snapshot builds. https://plt.eecs.northwestern.edu/snapshots/ Thanks, Dan On Wed, Mar 22, 2017 at 5:17 PM, Daniel Feltey wrote: > I think I've finally got something working within

Re: [racket-users] refactoring help/tools?

2017-03-22 Thread Daniel Feltey
I think I've finally got something working within DrRacket so I've just pushed a change to check-syntax[1] which adds a `Remove Unused Requires` right-click menu item to DrRacket which will remove all requires which check-syntax marks as unused. If you're using DrRacket from github, I'd

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Daniel Feltey
I've started working on adding this refactoring to DrRacket[1], it's not quite as full-featured(and is definitely still a bit buggy) as what racket-mode in emacs seems to allow, but it's a first step and I'd appreciate suggestions or requests on how DrRacket can better support developers editing

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Greg Hendershott
The `racket-trim-requires` and `racket-base-requires` commands use `raco check-requires` behind the scenes (then format/sort as does `racket-tidy-requires`). Today I tried to use `racket-trim-requires` on a Typed Racket file containing `define-type`; and got the error you mention. This turned out

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Matthias Felleisen
> On Mar 13, 2017, at 5:26 PM, Stephen De Gabrielle > wrote: > > Do you mean a drracket plugin that > i. Expands #lang racket into racket/base and requires, > ii. removes the unneeded requires I am sure that one day soon someone will write a dissertation that (1)

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Stephen De Gabrielle
Sorry - I meant to reply all. My questions weren't directed at anyone specific. S. On Mon, 13 Mar 2017 at 21:24, Stephen De Gabrielle wrote: > Do you mean a drracket plugin that > i. Expands #lang racket into racket/base and requires, > ii. removes the unneeded

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Matthias Felleisen
I know that one. I want the refactoring. > On Mar 13, 2017, at 1:40 PM, Robby Findler > wrote: > > Not the same thing, but if you mouse over the requires in DrRacket, it > will put a red background on the ones that have no apparent use (of > course, requires may

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Robby Findler
The bubble in the bottom right corner turns green when it is done (or red, if it found an error). Robby On Mon, Mar 13, 2017 at 12:52 PM, Dan Liebgold wrote: > On Monday, March 13, 2017 at 10:40:15 AM UTC-7, Robby Findler wrote: >> Not the same thing, but if you

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Dan Liebgold
On Monday, March 13, 2017 at 10:40:15 AM UTC-7, Robby Findler wrote: > Not the same thing, but if you mouse over the requires in DrRacket, it > will put a red background on the ones that have no apparent use (of > course, requires may have an effect too; neither tool picks that up, > IIUC). >

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Dan Liebgold
raco check-requires does the job. I use emacs racket-mode, but it's hobbled in ways I haven't investigated -- e.g. when I try to use tidy or trim requires it gives me a "Can't do, source file has error" when it doesn't, or at least not in a way I can see. -- You received this message because

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Robby Findler
Not the same thing, but if you mouse over the requires in DrRacket, it will put a red background on the ones that have no apparent use (of course, requires may have an effect too; neither tool picks that up, IIUC). Robby On Mon, Mar 13, 2017 at 12:38 PM, Jay McCarthy

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Jay McCarthy
Actually it is the trim option. I prefer racket-base-requires though Jay On Mon, Mar 13, 2017 at 1:37 PM Jay McCarthy wrote: > M-x racket-tidy-requires > > Jay > > On Mon, Mar 13, 2017 at 1:29 PM Matthias Felleisen > wrote: > > > Does Emacs really

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Jay McCarthy
M-x racket-tidy-requires Jay On Mon, Mar 13, 2017 at 1:29 PM Matthias Felleisen wrote: > > Does Emacs really give you this refactoring? If so, I may have to > reconsider DrRacket. > > > > On Mar 13, 2017, at 1:18 PM, Jay McCarthy > wrote: > > > >

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Philip McGrath
raco check-requires might do some of what you want. -Philip On Mon, Mar 13, 2017 at 12:18 PM, Jay McCarthy wrote: > racket-mode in Emacs does this > > Jay > > On Mon, Mar 13, 2017 at 1:17 PM Dan Liebgold > wrote: > >> Hi - >> >> In

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Matthias Felleisen
Does Emacs really give you this refactoring? If so, I may have to reconsider DrRacket. > On Mar 13, 2017, at 1:18 PM, Jay McCarthy wrote: > > racket-mode in Emacs does this > > Jay > > On Mon, Mar 13, 2017 at 1:17 PM Dan Liebgold >

Re: [racket-users] refactoring help/tools?

2017-03-13 Thread Jay McCarthy
racket-mode in Emacs does this Jay On Mon, Mar 13, 2017 at 1:17 PM Dan Liebgold wrote: > Hi - > > In refactoring a some Racket code I'd love to have a "require and provide > only what you need" tool to help trim down the require and provide lists. > Is there such a

[racket-users] refactoring help/tools?

2017-03-13 Thread Dan Liebgold
Hi - In refactoring a some Racket code I'd love to have a "require and provide only what you need" tool to help trim down the require and provide lists. Is there such a thing? Or at least a better approach for this than inspection or trial and error? Thanks, Dna -- You received this message