Code Critics for unloaded projects

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
14 messages Options
Reply | Threaded
Open this post in threaded view
|

Code Critics for unloaded projects

Bernat Romagosa
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.
Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Lukas Renggli
Being able to run Code Critics on not loaded code would be a very nice
thing, unfortunately it is not supported right now. We wanted to do
the same in SqueakSource when we originally wrote the software, but we
had to realize that a lot of the rules unnecessarily depend on the
fact that the code is installed.

It is still one of the todo items for the refactoring engine to make
Code Critics completely runnable on the refactoring code model. As the
Pharo code model is diverging more and more from the refactoring code
model this is more likely to happen anytime soon.

Lukas

On 4 April 2011 11:41, AxiNat <[hidden email]> wrote:

> Hi list,
> I have a pretty special need, which is to be able to run code critics on
> projects that have not yet been loaded into the image. For example, I need
> to browse an st file -or a squeaksource project- and before loading it I
> want to run critics on it, would this be possible somehow?
> If it looks like something noone would need to do, I understand. It's just
> that the project I'm working on is pretty particular... I've been exploring
> other possibilities but I'm afraid this is one of the few left for me to
> think of :(
> Thanks a lot in advance!
> Bernat Romagosa.



--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Mariano Martinez Peck
In reply to this post by Bernat Romagosa
Is not enough loading the classes but not showing them in the browser ? or maybe not putting them in Smalltalk ?

can you do kind of a fork (using OSProcess) of the proccess  running image which receives a .st file and in the new forked image you pass the .st in startup, do a file in and then run code-critics?

I am curious why you cannot load them hehehehhe

On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <[hidden email]> wrote:
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.



--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Bernat Romagosa
Lukas, if that happened anytime soon it would make my life much easier hehe

Is there a way I could help to give it a boost?

Mariano, the reason I cannot load the package is that it may contain (either intentionally or not) harmful code. An .st file can contain arbitrary code that is going to be executed at load time, so it'd be really easy to hack the image: "Object compile: 'new'!", for instance ;) 

The solution you propose looks interesting, but I'm not sure I've completely understood it. Do you mean to run a new image, send it the project file to be filed in, have it run the critics on the loaded package, and get the output back to the original image? If so, that's a solution I've been thinking of, but it would spend too many resources. Even though I could always use a very light image, if only 5 users were to be working on the app at the same time I'm afraid the system would begin to suffer :(

On a second thought, is there some smaller, simpler implementation of the SmallLint package? I wouldn't need to run all the tests, just a couple of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and actually not even all the tests in these categories.

Thanks a lot, I'm all ears :)

Bernat.

2011/4/4 Mariano Martinez Peck <[hidden email]>
Is not enough loading the classes but not showing them in the browser ? or maybe not putting them in Smalltalk ?

can you do kind of a fork (using OSProcess) of the proccess  running image which receives a .st file and in the new forked image you pass the .st in startup, do a file in and then run code-critics?

I am curious why you cannot load them hehehehhe


On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <[hidden email]> wrote:
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.



--
Mariano
http://marianopeck.wordpress.com


Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Bernat Romagosa
Hi again,

when trying Mariano's idea I get the following error:

forkSqueak requires XDisplayControlPlugin

Select Proceed to continue, or close this window to cancel the operation.

Do I need to recompile the VM to add support for this plugin? If so, are there any guidelines around on how to do it?

Thanks!

Bernat.

2011/4/4 AxiNat <[hidden email]>
Lukas, if that happened anytime soon it would make my life much easier hehe

Is there a way I could help to give it a boost?

Mariano, the reason I cannot load the package is that it may contain (either intentionally or not) harmful code. An .st file can contain arbitrary code that is going to be executed at load time, so it'd be really easy to hack the image: "Object compile: 'new'!", for instance ;) 

The solution you propose looks interesting, but I'm not sure I've completely understood it. Do you mean to run a new image, send it the project file to be filed in, have it run the critics on the loaded package, and get the output back to the original image? If so, that's a solution I've been thinking of, but it would spend too many resources. Even though I could always use a very light image, if only 5 users were to be working on the app at the same time I'm afraid the system would begin to suffer :(

On a second thought, is there some smaller, simpler implementation of the SmallLint package? I wouldn't need to run all the tests, just a couple of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and actually not even all the tests in these categories.

Thanks a lot, I'm all ears :)

Bernat.

2011/4/4 Mariano Martinez Peck <[hidden email]>
Is not enough loading the classes but not showing them in the browser ? or maybe not putting them in Smalltalk ?

can you do kind of a fork (using OSProcess) of the proccess  running image which receives a .st file and in the new forked image you pass the .st in startup, do a file in and then run code-critics?

I am curious why you cannot load them hehehehhe


On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <[hidden email]> wrote:
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.



--
Mariano
http://marianopeck.wordpress.com



Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Mariano Martinez Peck
http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294837&query=forkSqueak+requires+XDisplayControlPlugin

On Mon, Apr 4, 2011 at 4:34 PM, AxiNat <[hidden email]> wrote:
Hi again,

when trying Mariano's idea I get the following error:

forkSqueak requires XDisplayControlPlugin

Select Proceed to continue, or close this window to cancel the operation.

Do I need to recompile the VM to add support for this plugin? If so, are there any guidelines around on how to do it?

Thanks!

Bernat.

2011/4/4 AxiNat <[hidden email]>
Lukas, if that happened anytime soon it would make my life much easier hehe

Is there a way I could help to give it a boost?

Mariano, the reason I cannot load the package is that it may contain (either intentionally or not) harmful code. An .st file can contain arbitrary code that is going to be executed at load time, so it'd be really easy to hack the image: "Object compile: 'new'!", for instance ;) 

The solution you propose looks interesting, but I'm not sure I've completely understood it. Do you mean to run a new image, send it the project file to be filed in, have it run the critics on the loaded package, and get the output back to the original image? If so, that's a solution I've been thinking of, but it would spend too many resources. Even though I could always use a very light image, if only 5 users were to be working on the app at the same time I'm afraid the system would begin to suffer :(

On a second thought, is there some smaller, simpler implementation of the SmallLint package? I wouldn't need to run all the tests, just a couple of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and actually not even all the tests in these categories.

Thanks a lot, I'm all ears :)

Bernat.

2011/4/4 Mariano Martinez Peck <[hidden email]>
Is not enough loading the classes but not showing them in the browser ? or maybe not putting them in Smalltalk ?

can you do kind of a fork (using OSProcess) of the proccess  running image which receives a .st file and in the new forked image you pass the .st in startup, do a file in and then run code-critics?

I am curious why you cannot load them hehehehhe


On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <[hidden email]> wrote:
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.



--
Mariano
http://marianopeck.wordpress.com






--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Bernat Romagosa
Hi Mariano, thanks, but I had already checked that discussion. The bundle that Esteban provided didn't work, quoting Stef:

Thanks a lot 
I copied in the resources folder of 5.7.4 
It crashes. 

Also, the thread was about it not working on MacOS (it made sense, it's an X11 control plugin), but I'm on Debian Linux. The only XDisplayControlPlugin I can find around is provided by the squeaksource pagage XDCP, but loading it fixes nothing either...

2011/4/4 Mariano Martinez Peck <[hidden email]>
http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294837&query=forkSqueak+requires+XDisplayControlPlugin


On Mon, Apr 4, 2011 at 4:34 PM, AxiNat <[hidden email]> wrote:
Hi again,

when trying Mariano's idea I get the following error:

forkSqueak requires XDisplayControlPlugin

Select Proceed to continue, or close this window to cancel the operation.

Do I need to recompile the VM to add support for this plugin? If so, are there any guidelines around on how to do it?

Thanks!

Bernat.

2011/4/4 AxiNat <[hidden email]>
Lukas, if that happened anytime soon it would make my life much easier hehe

Is there a way I could help to give it a boost?

Mariano, the reason I cannot load the package is that it may contain (either intentionally or not) harmful code. An .st file can contain arbitrary code that is going to be executed at load time, so it'd be really easy to hack the image: "Object compile: 'new'!", for instance ;) 

The solution you propose looks interesting, but I'm not sure I've completely understood it. Do you mean to run a new image, send it the project file to be filed in, have it run the critics on the loaded package, and get the output back to the original image? If so, that's a solution I've been thinking of, but it would spend too many resources. Even though I could always use a very light image, if only 5 users were to be working on the app at the same time I'm afraid the system would begin to suffer :(

On a second thought, is there some smaller, simpler implementation of the SmallLint package? I wouldn't need to run all the tests, just a couple of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and actually not even all the tests in these categories.

Thanks a lot, I'm all ears :)

Bernat.

2011/4/4 Mariano Martinez Peck <[hidden email]>
Is not enough loading the classes but not showing them in the browser ? or maybe not putting them in Smalltalk ?

can you do kind of a fork (using OSProcess) of the proccess  running image which receives a .st file and in the new forked image you pass the .st in startup, do a file in and then run code-critics?

I am curious why you cannot load them hehehehhe


On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <[hidden email]> wrote:
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.



--
Mariano
http://marianopeck.wordpress.com






--
Mariano
http://marianopeck.wordpress.com


Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Stéphane Ducasse
In reply to this post by Lukas Renggli
> Being able to run Code Critics on not loaded code would be a very nice
> thing, unfortunately it is not supported right now. We wanted to do
> the same in SqueakSource when we originally wrote the software, but we
> had to realize that a lot of the rules unnecessarily depend on the
> fact that the code is installed.
>
> It is still one of the todo items for the refactoring engine to make
> Code Critics completely runnable on the refactoring code model. As the
> Pharo code model is diverging more and more from the refactoring code
> model this is more likely to happen anytime soon.

Lukas what do you say that. Fixing the API of the RB code model should be simple to do.
Especially since the code model does not have to run on all the smalltalk dialect so we are
free to fix it.

In addition the RB code model has always been a wrapper on top of other.  
We are working on Ring and the point is to use it to manage the source code and off-line
source code model and the one of RB too -- may be you do not believe it but if we
do not try we will not move and we should have an infrastructure that enable us to move.

Now finally I do not see why changing is a problem, especially since the runtime
system does not have to be the same everything.

Stef


Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Mariano Martinez Peck
In reply to this post by Bernat Romagosa
Sorry, I am useless then. I just cc'ed Dave to see if he can help.

Cheers

mariano


On Mon, Apr 4, 2011 at 5:02 PM, AxiNat <[hidden email]> wrote:
Hi Mariano, thanks, but I had already checked that discussion. The bundle that Esteban provided didn't work, quoting Stef:

Thanks a lot 
I copied in the resources folder of 5.7.4 
It crashes. 

Also, the thread was about it not working on MacOS (it made sense, it's an X11 control plugin), but I'm on Debian Linux. The only XDisplayControlPlugin I can find around is provided by the squeaksource pagage XDCP, but loading it fixes nothing either...


2011/4/4 Mariano Martinez Peck <[hidden email]>
http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294837&query=forkSqueak+requires+XDisplayControlPlugin


On Mon, Apr 4, 2011 at 4:34 PM, AxiNat <[hidden email]> wrote:
Hi again,

when trying Mariano's idea I get the following error:

forkSqueak requires XDisplayControlPlugin

Select Proceed to continue, or close this window to cancel the operation.

Do I need to recompile the VM to add support for this plugin? If so, are there any guidelines around on how to do it?

Thanks!

Bernat.

2011/4/4 AxiNat <[hidden email]>
Lukas, if that happened anytime soon it would make my life much easier hehe

Is there a way I could help to give it a boost?

Mariano, the reason I cannot load the package is that it may contain (either intentionally or not) harmful code. An .st file can contain arbitrary code that is going to be executed at load time, so it'd be really easy to hack the image: "Object compile: 'new'!", for instance ;) 

The solution you propose looks interesting, but I'm not sure I've completely understood it. Do you mean to run a new image, send it the project file to be filed in, have it run the critics on the loaded package, and get the output back to the original image? If so, that's a solution I've been thinking of, but it would spend too many resources. Even though I could always use a very light image, if only 5 users were to be working on the app at the same time I'm afraid the system would begin to suffer :(

On a second thought, is there some smaller, simpler implementation of the SmallLint package? I wouldn't need to run all the tests, just a couple of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and actually not even all the tests in these categories.

Thanks a lot, I'm all ears :)

Bernat.

2011/4/4 Mariano Martinez Peck <[hidden email]>
Is not enough loading the classes but not showing them in the browser ? or maybe not putting them in Smalltalk ?

can you do kind of a fork (using OSProcess) of the proccess  running image which receives a .st file and in the new forked image you pass the .st in startup, do a file in and then run code-critics?

I am curious why you cannot load them hehehehhe


On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <[hidden email]> wrote:
Hi list,

I have a pretty special need, which is to be able to run code critics on projects that have not yet been loaded into the image. For example, I need to browse an st file -or a squeaksource project- and before loading it I want to run critics on it, would this be possible somehow?

If it looks like something noone would need to do, I understand. It's just that the project I'm working on is pretty particular... I've been exploring other possibilities but I'm afraid this is one of the few left for me to think of :(

Thanks a lot in advance!

Bernat Romagosa.



--
Mariano
http://marianopeck.wordpress.com






--
Mariano
http://marianopeck.wordpress.com





--
Mariano
http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Lukas Renggli
In reply to this post by Stéphane Ducasse
>> It is still one of the todo items for the refactoring engine to make
>> Code Critics completely runnable on the refactoring code model. As the
>> Pharo code model is diverging more and more from the refactoring code
>> model this is more likely to happen anytime soon.
>
> Lukas what do you say that. Fixing the API of the RB code model should be simple to do.
> Especially since the code model does not have to run on all the smalltalk dialect so we are
> free to fix it.

That is not entirely true, Slime and Magritte Critics rules (at least
used to) run on other dialects too. Also there is external code that
depends on it, such as Helvetia, Opal, ST2JS, SmaCC, ...

The reason for moving Code Critics to use the refactoring model is
that there will be only a single interaction point with the base
system (Pharo). This will make maintenance simpler as only a single
place needs to be updated (BrowserEnvironment for read-reflection,
RefactoryChange for write-reflection).

I don't know why Code Critics does not use the refactoring code model?
It probably has historical reasons: Maybe it was a separate codebase
at some point? Maybe it was done for performance reasons?

> In addition the RB code model has always been a wrapper on top of other.

No, the refactoring code model is not a wrapper: it doesn't
necessarily wrap something.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

David T. Lewis
In reply to this post by Mariano Martinez Peck
Bernat,

OSProcess and CommandShell will work with a SqueakVM from
http://www.squeakvm.org/unix/ so to solve your immediate problem
you can use that VM.

For background, a unix VM should include the OSProcess plugin, AIO plugin,
and XDisplayControlPlugin. Cog VM's need some platform patches which
may not yet have been integrated into the code base. With those patches
in place, #forkSqueak will work on Cog, although the UI will not function
for the forked image (but this is not a problem for many usages).

Dave


On Mon, Apr 04, 2011 at 06:35:20PM +0200, Mariano Martinez Peck wrote:

> Sorry, I am useless then. I just cc'ed Dave to see if he can help.
>
> Cheers
>
> mariano
>
>
> On Mon, Apr 4, 2011 at 5:02 PM, AxiNat <[hidden email]>wrote:
>
> > Hi Mariano, thanks, but I had already checked that discussion. The bundle
> > that Esteban provided didn't work, quoting Stef:
> >
> >
> > Thanks a lot
> > I copied in the resources folder of 5.7.4
> > It crashes.
> >
> >
> > Also, the thread was about it not working on MacOS (it made sense, it's an
> > X11 control plugin), but I'm on Debian Linux. The only XDisplayControlPlugin
> > I can find around is provided by the squeaksource pagage XDCP, but loading
> > it fixes nothing either...
> >
> >
> > 2011/4/4 Mariano Martinez Peck <[hidden email]>
> >
> >>
> >> http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294837&query=forkSqueak+requires+XDisplayControlPlugin
> >>
> >>
> >> On Mon, Apr 4, 2011 at 4:34 PM, AxiNat <[hidden email]>wrote:
> >>
> >>> Hi again,
> >>>
> >>> when trying Mariano's idea I get the following error:
> >>>
> >>> *forkSqueak requires XDisplayControlPlugin*
> >>> *
> >>> *
> >>> *Select Proceed to continue, or close this window to cancel the
> >>> operation.*
> >>>
> >>>
> >>> Do I need to recompile the VM to add support for this plugin? If so, are
> >>> there any guidelines around on how to do it?
> >>>
> >>> Thanks!
> >>>
> >>> Bernat.
> >>>
> >>> 2011/4/4 AxiNat <[hidden email]>
> >>>
> >>>> Lukas, if that happened anytime soon it would make my life much easier
> >>>> hehe
> >>>>
> >>>> Is there a way I could help to give it a boost?
> >>>>
> >>>> Mariano, the reason I cannot load the package is that it may contain
> >>>> (either intentionally or not) harmful code. An .st file can contain
> >>>> arbitrary code that is going to be executed at load time, so it'd be really
> >>>> easy to hack the image: "Object compile: 'new'!", for instance ;)
> >>>>
> >>>> The solution you propose looks interesting, but I'm not sure I've
> >>>> completely understood it. Do you mean to run a new image, send it the
> >>>> project file to be filed in, have it run the critics on the loaded package,
> >>>> and get the output back to the original image? If so, that's a solution I've
> >>>> been thinking of, but it would spend too many resources. Even though I could
> >>>> always use a very light image, if only 5 users were to be working on the app
> >>>> at the same time I'm afraid the system would begin to suffer :(
> >>>>
> >>>> On a second thought, is there some smaller, simpler implementation of
> >>>> the SmallLint package? I wouldn't need to run all the tests, just a couple
> >>>> of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and
> >>>> actually not even all the tests in these categories.
> >>>>
> >>>> Thanks a lot, I'm all ears :)
> >>>>
> >>>> Bernat.
> >>>>
> >>>> 2011/4/4 Mariano Martinez Peck <[hidden email]>
> >>>>
> >>>>> Is not enough loading the classes but not showing them in the browser ?
> >>>>> or maybe not putting them in Smalltalk ?
> >>>>>
> >>>>> can you do kind of a fork (using OSProcess) of the proccess  running
> >>>>> image which receives a .st file and in the new forked image you pass the .st
> >>>>> in startup, do a file in and then run code-critics?
> >>>>>
> >>>>> I am curious why you cannot load them hehehehhe
> >>>>>
> >>>>>
> >>>>> On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <
> >>>>> [hidden email]> wrote:
> >>>>>
> >>>>>> Hi list,
> >>>>>>
> >>>>>> I have a pretty special need, which is to be able to run code critics
> >>>>>> on projects that have not yet been loaded into the image. For example, I
> >>>>>> need to browse an st file -or a squeaksource project- and before loading it
> >>>>>> I want to run critics on it, would this be possible somehow?
> >>>>>>
> >>>>>> If it looks like something noone would need to do, I understand. It's
> >>>>>> just that the project I'm working on is pretty particular... I've been
> >>>>>> exploring other possibilities but I'm afraid this is one of the few left for
> >>>>>> me to think of :(
> >>>>>>
> >>>>>> Thanks a lot in advance!
> >>>>>>
> >>>>>> Bernat Romagosa.
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Mariano
> >>>>> http://marianopeck.wordpress.com
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >>
> >> --
> >> Mariano
> >> http://marianopeck.wordpress.com
> >>
> >>
> >
>
>
> --
> Mariano
> http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Bernat Romagosa
Dave, thanks a lot, I'm gonna try it right away.

On the other topic, I'm not sure I completely understood what the problem is. Couldn't we write an extension to Code Critics that ran on unloaded code? In which ways would that break compatibility with other dialects?

I think this functionality would be really neat for projects that deal with other smalltalk projects (like Squeaksource/Squeakhub), and as it's pretty crucial to my project I'm willing and able to put my time into it. The problem is I'm afraid my skills do not suffice to take on this project on my own, so any guidelines on how to proceed or who to address would be of great help :)

Bernat Romagosa.

2011/4/4 David T. Lewis <[hidden email]>
Bernat,

OSProcess and CommandShell will work with a SqueakVM from
http://www.squeakvm.org/unix/ so to solve your immediate problem
you can use that VM.

For background, a unix VM should include the OSProcess plugin, AIO plugin,
and XDisplayControlPlugin. Cog VM's need some platform patches which
may not yet have been integrated into the code base. With those patches
in place, #forkSqueak will work on Cog, although the UI will not function
for the forked image (but this is not a problem for many usages).

Dave


On Mon, Apr 04, 2011 at 06:35:20PM +0200, Mariano Martinez Peck wrote:
> Sorry, I am useless then. I just cc'ed Dave to see if he can help.
>
> Cheers
>
> mariano
>
>
> On Mon, Apr 4, 2011 at 5:02 PM, AxiNat <[hidden email]>wrote:
>
> > Hi Mariano, thanks, but I had already checked that discussion. The bundle
> > that Esteban provided didn't work, quoting Stef:
> >
> >
> > Thanks a lot
> > I copied in the resources folder of 5.7.4
> > It crashes.
> >
> >
> > Also, the thread was about it not working on MacOS (it made sense, it's an
> > X11 control plugin), but I'm on Debian Linux. The only XDisplayControlPlugin
> > I can find around is provided by the squeaksource pagage XDCP, but loading
> > it fixes nothing either...
> >
> >
> > 2011/4/4 Mariano Martinez Peck <[hidden email]>
> >
> >>
> >> http://forum.world.st/template/NamlServlet.jtp?macro=search_page&node=1294837&query=forkSqueak+requires+XDisplayControlPlugin
> >>
> >>
> >> On Mon, Apr 4, 2011 at 4:34 PM, AxiNat <[hidden email]>wrote:
> >>
> >>> Hi again,
> >>>
> >>> when trying Mariano's idea I get the following error:
> >>>
> >>> *forkSqueak requires XDisplayControlPlugin*
> >>> *
> >>> *
> >>> *Select Proceed to continue, or close this window to cancel the
> >>> operation.*
> >>>
> >>>
> >>> Do I need to recompile the VM to add support for this plugin? If so, are
> >>> there any guidelines around on how to do it?
> >>>
> >>> Thanks!
> >>>
> >>> Bernat.
> >>>
> >>> 2011/4/4 AxiNat <[hidden email]>
> >>>
> >>>> Lukas, if that happened anytime soon it would make my life much easier
> >>>> hehe
> >>>>
> >>>> Is there a way I could help to give it a boost?
> >>>>
> >>>> Mariano, the reason I cannot load the package is that it may contain
> >>>> (either intentionally or not) harmful code. An .st file can contain
> >>>> arbitrary code that is going to be executed at load time, so it'd be really
> >>>> easy to hack the image: "Object compile: 'new'!", for instance ;)
> >>>>
> >>>> The solution you propose looks interesting, but I'm not sure I've
> >>>> completely understood it. Do you mean to run a new image, send it the
> >>>> project file to be filed in, have it run the critics on the loaded package,
> >>>> and get the output back to the original image? If so, that's a solution I've
> >>>> been thinking of, but it would spend too many resources. Even though I could
> >>>> always use a very light image, if only 5 users were to be working on the app
> >>>> at the same time I'm afraid the system would begin to suffer :(
> >>>>
> >>>> On a second thought, is there some smaller, simpler implementation of
> >>>> the SmallLint package? I wouldn't need to run all the tests, just a couple
> >>>> of them: Bugs, Intention Revealing, Miscelaneous and Unnecessary Code, and
> >>>> actually not even all the tests in these categories.
> >>>>
> >>>> Thanks a lot, I'm all ears :)
> >>>>
> >>>> Bernat.
> >>>>
> >>>> 2011/4/4 Mariano Martinez Peck <[hidden email]>
> >>>>
> >>>>> Is not enough loading the classes but not showing them in the browser ?
> >>>>> or maybe not putting them in Smalltalk ?
> >>>>>
> >>>>> can you do kind of a fork (using OSProcess) of the proccess  running
> >>>>> image which receives a .st file and in the new forked image you pass the .st
> >>>>> in startup, do a file in and then run code-critics?
> >>>>>
> >>>>> I am curious why you cannot load them hehehehhe
> >>>>>
> >>>>>
> >>>>> On Mon, Apr 4, 2011 at 11:41 AM, AxiNat <
> >>>>> [hidden email]> wrote:
> >>>>>
> >>>>>> Hi list,
> >>>>>>
> >>>>>> I have a pretty special need, which is to be able to run code critics
> >>>>>> on projects that have not yet been loaded into the image. For example, I
> >>>>>> need to browse an st file -or a squeaksource project- and before loading it
> >>>>>> I want to run critics on it, would this be possible somehow?
> >>>>>>
> >>>>>> If it looks like something noone would need to do, I understand. It's
> >>>>>> just that the project I'm working on is pretty particular... I've been
> >>>>>> exploring other possibilities but I'm afraid this is one of the few left for
> >>>>>> me to think of :(
> >>>>>>
> >>>>>> Thanks a lot in advance!
> >>>>>>
> >>>>>> Bernat Romagosa.
> >>>>>>
> >>>>>
> >>>>>
> >>>>>
> >>>>> --
> >>>>> Mariano
> >>>>> http://marianopeck.wordpress.com
> >>>>>
> >>>>>
> >>>>
> >>>
> >>
> >>
> >> --
> >> Mariano
> >> http://marianopeck.wordpress.com
> >>
> >>
> >
>
>
> --
> Mariano
> http://marianopeck.wordpress.com

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Lukas Renggli
> On the other topic, I'm not sure I completely understood what the problem
> is. Couldn't we write an extension to Code Critics that ran on unloaded
> code?

The problem is that Code Critics makes the assumption that the code is
loaded and does a lot of hard-core reflection using the system API.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch

Reply | Threaded
Open this post in threaded view
|

Re: Code Critics for unloaded projects

Bernat Romagosa
Ok I understand, and I guess modifying this would mean re-engineering the whole thing, right?

Are there any alternatives around? Could you, for example, use Moose to analyse smalltalk code quality? I've heard about Chuck too, but I'm not sure the project is alive...

Thanks!

Bernat.

2011/4/5 Lukas Renggli <[hidden email]>
> On the other topic, I'm not sure I completely understood what the problem
> is. Couldn't we write an extension to Code Critics that ran on unloaded
> code?

The problem is that Code Critics makes the assumption that the code is
loaded and does a lot of hard-core reflection using the system API.

Lukas

--
Lukas Renggli
www.lukas-renggli.ch