Coder Social home page Coder Social logo

gemtalk / rowan Goto Github PK

View Code? Open in Web Editor NEW
13.0 13.0 7.0 57.63 MB

a new project/package manager for Smalltalk that supports FileTree and Tonel repositories, and is independent of Monticello and Metacello

License: MIT License

Smalltalk 99.82% Shell 0.11% Witcher Script 0.07%
gemstone smalltalk

rowan's People

Contributors

ablakeman avatar allenotis avatar dalehenrich avatar ericwinger avatar lisaalmarode avatar martinmcclure avatar rjsargent avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

rowan's Issues

Lost ability to add a package & project (or at least see it)

Not quite sure what I've done but Package/Project creation quit working mysteriously.

In the test_rowan_340 repository, you can send RowanPackageDefinitionService>>createPackageNamed:inProject:

The default symbol dictionary name is 'SampleSymbolDictionaryName'. No walkbacks or failure messages in the transcript. It just doesn't show up in the category list.

Maybe pilot error, but I'm creating the packages the same way Dale and I did this morning.

packageName: (NONE) causes class compilation error

Per this morning's discussion, classes that are not in Rowan now should have a class creation template with '(NONE)' in the package name. However this doesn't compile, making it difficult to do development.

RowanDefinitionService rwSubclass: 'RowanClassDefinitionService'
instVarNames: #( name comment instVarNames
classVarNames classInstVarNames superclassName subclassType
poolDictionaryNames classType packageService meta)
classVars: #()
classInstVars: #()
poolDictionaries: #()
category: 'Rowan-Services'
packageName: '(NONE)'
options: #()

a UserDefinedError occurred (error 2318), reason:halt, No package named '(NONE)' found
UserDefinedError (AbstractException) >> _signalWith: @6 line 25
UserDefinedError (AbstractException) >> signal @2 line 47
RwPrjBrowserTool (Object) >> error: @6 line 7
[] in RwPrjBrowserTool >> addOrUpdateClassDefinition:type:superclass:instVarNames:classVars:classInstVars:poolDictionaries:category:packageName:options: @29 line 6
RwGsImage class >> loadedPackageNamed:ifAbsent: @5 line 11
RwPrjBrowserTool >> _loadedPackageNamed:ifAbsent: @3 line 3
RwPrjBrowserTool >> addOrUpdateClassDefinition:type:superclass:instVarNames:classVars:classInstVars:poolDictionaries:category:packageName:options: @3 line 5
RowanDefinitionService class (Class) >> rwSubclass:instVarNames:classVars:classInstVars:poolDictionaries:category:packageName:options: @6 line 4
Executed Code @2 line 1
GsNMethod >> _executeInContext: @1 line 1
String >> evaluate @5 line 9
JadeServer64bit34 (JadeServer) >> sbClass: @5 line 5
JadeServer64bit34 (JadeServer) >> systemBrowserCommand @74 line 24
[] in JadeServer >> systemBrowserA: @23 line 10
Time class >> secondsElapsedTime: @6 line 11
Time class >> millisecondsElapsedTime: @2 line 6
JadeServer64bit34 (JadeServer) >> millisecondsElapsedTime: @2 line 3
JadeServer64bit34 (JadeServer) >> systemBrowserA: @3 line 4
JadeServer64bit34 (JadeServer) >> systemBrowser: @3 line 2
[] in JadeServer64bit >> systemBrowser: @7 line 4
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit) >> systemBrowser: @3 line 5
GsNMethod class >> _gsReturnToC @1 line 1

Recompiling method fails

In a rowan-aware class, you can create a method by sending rwCompileMethod:category: to a behavior. The creation of new methods works fine.

Make a change to the method and compile again and it fails with this error.

a UserDefinedError occurred (error 2318), reason:halt, Internal error -- no existing LoadedMethod found for the old compiledMethod.

UserDefinedError (AbstractException) >> _signalWith: @6 line 25
UserDefinedError (AbstractException) >> signal @2 line 47
RwGsPackageSymbolDictionary (Object) >> error: @6 line 7
[] in RwGsPackageSymbolDictionary >> addRecompiledMethod: @38 line 35
IdentityKeyValueDictionary >> at:ifAbsent: @26 line 19
RwGsPackageSymbolDictionary >> addRecompiledMethod: @15 line 32
RwGsMethodSourceSymbolDictPatch >> installSourcePatch @3 line 5
[] in RwGsPatchSetBasic >> updateMethodDictionaries @13 line 10
[] in Set >> do: @8 line 11
KeyValueDictionary >> keysDo: @20 line 18
Set >> do: @4 line 11
RwGsPatchSetBasic >> updateMethodDictionaries @4 line 10
RwGsPatchSetBasic >> apply @19 line 24
RwGsImage class >> applyModification: @11 line 9
RwPrjLoadTool >> loadProjectSetDefinition: @14 line 13
[] in RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta:inPackageNamed: @69 line 55
[] in RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta:inPackageNamed: @79 line 63
[] in RwAbstractTool >> definitionsForClassNamed:ifFound:ifAbsent: @20 line 11
RwGsImage class >> loadedClassNamed:ifFound:ifAbsent: @10 line 11
RwPrjBrowserTool (RwAbstractTool) >> definitionsForClassNamed:ifFound:ifAbsent: @4 line 4
RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta:inPackageNamed: @13 line 60
RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta: @13 line 29
MyNewClass class (Behavior) >> rwCompileMethod:category: @8 line 4
[] in JadeServer64bit3x >> compileMethod:behavior:symbolList:inCategory: @12 line 7
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
[] in JadeServer64bit3x >> compileMethod:behavior:symbolList:inCategory: @8 line 13
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit3x) >> compileMethod:behavior:symbolList:inCategory: @3 line 15
JadeServer64bit34 (JadeServer) >> sbSaveMethod: @13 line 9
JadeServer64bit34 (JadeServer) >> systemBrowserCommand @122 line 40
[] in JadeServer >> systemBrowserA: @23 line 10
Time class >> secondsElapsedTime: @6 line 11
Time class >> millisecondsElapsedTime: @2 line 6
JadeServer64bit34 (JadeServer) >> millisecondsElapsedTime: @2 line 3
JadeServer64bit34 (JadeServer) >> systemBrowserA: @3 line 4
JadeServer64bit34 (JadeServer) >> systemBrowser: @3 line 2
[] in JadeServer64bit >> systemBrowser: @7 line 4
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit) >> systemBrowser: @3 line 5
GsNMethod class >> _gsReturnToC @1 line 1

fileout category?

GS Jade doesn't have a tool (that I can yet find) to file out class categories.
Is there a class category fileout available in the server?

(I'd like to backup my code independently of Rowan for now. I lost yesterday's work when I rebuilt this morning.)

initialization order

Currently the initialization order is unspecified:

runInitializers

	"run the class initialization methods as needed"

	(addedMethods copy
		addAll: extendedMethods;
		addAll: methodsNeedingRecompile;
		yourself) do: [ :methodPatch | methodPatch runInitializer ]

RwPackageProjectSpecification>>packageNamesInLoadOrder should be renamed to RwPackageProjectSpecification>>packageNamesInInitializationOrder (load order is immaterial because of atomic loading - at least at the moment) and the the initializers should be run in package initialization order (first) and class hierarchy order (secondary) ...

unexpected results sending #rowanPackageName and #rowanProjectName to method

Even though I created the method MyNewClass>>createdWithRowan with the rwCompileMethod:category and MyNewClass is a rowan-aware class, sending rowanPackageName and rowanProjectName to the compiled method returns (NONE)

Sending the same methods to the compiled method fnoodle3 correctly finds the package and project.

incorrect class definition string

Sending method classCreationTemplateForClass:hybridBrowser: to RowanDefinitionService results in this class definition string, however this method does not appear to be implemented in Rowan:

Object rwSubclass: 'RowanDefinitionService'
instVarNames: #( definition)
classVars: #()
classInstVars: #()
poolDictionaries: #()
inDictionary: ''
category: 'Rowan-Services'
options: #()

return result of successful method compile

In order to update the Dolphin/GS Jade browsers, it would be helpful if the return value of a successful method compile contained this information - method oop, selector.

In particular, RwPrjBrowserTool>>addOrUpdateMethod:inProtocol:forClassNamed:isMeta:inPackageNamed:?
currently returns a RwProjectSetModification. โ€‹

It's not clear to me how to navigate through that object to return the above information.

Additional message needed on clone

If you try to clone an already cloned repository, Rowan will attach to the existing clone.

We need an additional message saying that even though the clone was not cloned, it still was attached.

can't update Rowan

I updated Rowan via the update script, then realized I had not updated my services category. So I recovered, then pushed services to the Rowan shared git repository. I then tried the update rowan script again and it failed with this error.

Dead in water.

topaz > exec iferr 3 : exit 1 
Logging out session 1.
--- 04/05/2018 15:30:50.508 PDT Logging out
Error on or near line 64 :: startTopaz test_rowan_340 -l :: startTopaz test_rowan_340 -l

Need McPatch emulation

This would be a short-term hack for showing differences in 'hybrid Jade'

Note -Hybrid Jade is the 'quick and dirty' way to get Rowan development in Jade

need clarity on when Rowan objects become referenceable by name

Too often, I either can't reference an Rowan object (method, class, package, project) by name when I think I should, or I inadvertently try to 're-add' an object that I added before because I referenced it's name.

Here is one use case:

  1. Create a project definition.
  2. Load it by - ... projectTools load loadProjectDefinition:.
  3. Add a package definition by sending #addPackageNamed: to the project definition.
  4. Add a class by sending #addClass:inPackageNamed:inProject: to projectTools.
  5. Try to add method with browserTool by sending addOrUpdateMethod:inProtocol:... get 'class not found' error.
  6. Go back to Step 3 and 'reload' the project definition after adding the class gets 'attempt to add existing package'

I'm unable to get around this.

method compilation category restrictions?

In order to use the recently-added #rwCompileMethod's on Behavior, is it required to have created the package first?

(I don't have a way for you to easily reproduce this walkback)

UserDefinedError (AbstractException) >> _signalWith: @6 line 25
UserDefinedError (AbstractException) >> signal @2 line 47
RwPrjBrowserTool (Object) >> error: @6 line 7
[] in RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta: @13 line 18
RwGsImage class >> loadedHybridPackageNamed:ifAbsent: @5 line 14
Rowan class >> loadedHybridPackageNamed:ifAbsent: @3 line 3
RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta: @3 line 15
RowanMethodDefinitionService class (Behavior) >> rwCompileMethod:category: @8 line 4
[] in JadeServer64bit3x >> compileMethod:behavior:symbolList:inCategory: @12 line 7
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
[] in JadeServer64bit3x >> compileMethod:behavior:symbolList:inCategory: @8 line 13
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit3x) >> compileMethod:behavior:symbolList:inCategory: @3 line 15
JadeServer64bit34 (JadeServer) >> sbSaveMethod: @13 line 9
JadeServer64bit34 (JadeServer) >> systemBrowserCommand @122 line 40
[] in JadeServer >> systemBrowserA: @23 line 10
Time class >> secondsElapsedTime: @6 line 11
"rowanStack.gs" [dos] 25L, 1585C 1,1 Top

Need discussion for long-term Rowan Diffs and Dirty State

What is the api for determining a Rowan object's change/modification/dirty state?

I found RwLoadedPackage inst var isDirty, but that is only for packages and I would expect that any RwLoadedThing should have an api for identifying changes. (Maybe not RwLoadedMethod)

changes to class creation template of non-rowan classes gives walkback

Executing the recently-changed class creation template for non-rowan packages gives a walkback presumably because the dictionary is missing.

To reproduce, execute this string:

RowanDefinitionService subclass: 'RowanProjectDefinitionService'
	instVarNames: #(name)
	classVars: #()
	classInstVars: #()
	poolDictionaries: #()
	category: 'Rowan-Services'
	inDictionary: ''
	options: #()

which was generated by:

^self browserTool classCreationTemplateForClass: RowanProjectDefinitionService hybridBrowser: true.

a MessageNotUnderstood occurred (error 2010), a String does not understand #'at:otherwise:'
MessageNotUnderstood >> defaultAction @3 line 3
MessageNotUnderstood (AbstractException) >> _signalWith: @6 line 25
MessageNotUnderstood (AbstractException) >> signal @2 line 47
String (Object) >> doesNotUnderstand: @10 line 10
String (Object) >> _doesNotUnderstand:args:envId:reason: @8 line 13
RowanDefinitionService class (Class) >> _classNamed:inDictionary: @9 line 5
RowanDefinitionService class (Class) >> subclass:instVarNames:classVars:classInstVars:poolDictionaries:inDictionary:options: @2 line 34
RowanDefinitionService class (Class) >> subclass:instVarNames:classVars:classInstVars:poolDictionaries:category:inDictionary:options: @3 line 10
Executed Code @2 line 1
GsNMethod >> _executeInContext: @1 line 1
String >> evaluate @5 line 9
JadeServer64bit34 (JadeServer) >> sbClass: @5 line 5
JadeServer64bit34 (JadeServer) >> systemBrowserCommand @74 line 24
[] in JadeServer >> systemBrowserA: @23 line 10
Time class >> secondsElapsedTime: @6 line 11
Time class >> millisecondsElapsedTime: @2 line 6
JadeServer64bit34 (JadeServer) >> millisecondsElapsedTime: @2 line 3
JadeServer64bit34 (JadeServer) >> systemBrowserA: @3 line 4
JadeServer64bit34 (JadeServer) >> systemBrowser: @3 line 2
[] in JadeServer64bit >> systemBrowser: @7 line 4
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit) >> systemBrowser: @3 line 5
GsNMethod class >> _gsReturnToC @1 line 1

rowan build script fails

Here is the tail end of running
./newBuild_rowan

topaz 1> 
topaz 1>   commit
Successful commit
topaz 1> 
topaz 1>   run
  | packageManager repo |
  packageManager := CypressPackageManager3 new.
  repo := CypressAbstractRepository
    onUrl: (CypressUrl absoluteFromText: 'tonel:/foos2/users/ewinger/GsDevKit_home/shared/repos/Rowan/src/tonel/'  )
    alias: ''.
  packageManager
    defaultSymbolDictionaryName: #'UserGlobals'.
  #('Cypress-Core' 'Rowan-Url' 'Rowan-Core' 'Rowan-GemStone' 'Rowan-Cypress' 'Rowan-Tests' 'Rowan-Tode')
    do: [ :packageName | 
      packageManager
        addResolvedReference:
          (CypressResolvedReference name: packageName repository: repo) ].
  packageManager loadResolvedReferences
%
ERROR 2710 , a CypressAddition(add: a CypressMethodDefinition(TDRowanTool class>>initialize)) failed because a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand  #'repositoryTools' (CypressLoaderError)
topaz 1> 
topaz 1>   run
  Rowan addProject: (STON fromString: (GsFile openReadOnServer: '/foos2/users/ewinger/GsDevKit_home/server/stones/test_rowan_340/rowanSpec.ston') contentsOfEntireFile)
%
ERROR 2010 , a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand  #'image' (MessageNotUnderstood)
topaz 1>   commit
Successful commit
topaz 1>   exit
Logging out session 1.
--- 03/08/2018 17:12:06.412 PST Logging out
**Error on or near line 64 :: startTopaz test_rowan_340 -l :: startTopaz test_rowan_340 -l**
ewinger@foos:/foos2/users/ewinger/GsDevKit_home/server/stones/test_rowan_340$ 

Unable to start tode client from Rowan installation instructions

https://github.com/dalehenrich/Rowan#gsdevkit_home-rowan-installation

The final step of the installation failed.

ewinger@foos:/foos2/users/ewinger/GsDevKit_home/shared/repos$ startClient tode
"================="
GsDevKit script: startClient tode
path: /foos2/users/ewinger/GsDevKit_home/bin/startClient
"================="
"================="
GsDevKit script: startClient tode
path: /foos2/users/ewinger/GsDevKit_home/dev/clients/tode/startClient
"================="
Pharo STDOUT routed to: /foos2/users/ewinger/GsDevKit_home/dev/clients/tode/logs/tode.log
/foos2/users/ewinger/GsDevKit_home/dev/clients/tode/startClient: line 186: kill: (3929) - No such process
Error on or near line 186 :: startClient tode :: startClient tode
Error on or near line 70 :: startClient tode :: startClient tode


Note. During a prior step, I noticed a potential error message. Shell history didn't go back far enough to see which command it was. It may be related.

Warning: LOCK ENFORCED: Attempt to 'load with conflicts' new project: 'BaselineOfGrease [baseline] from github://GsDevKit/Grease:master/repository' when existing project: 'BaselineOfGrease [baseline] from filetree:///foos2/users/ewinger/GsDevKit_home/shared/repos/Grease/repository' is locked. New project not loaded. Use #onLock: to intercept.

GS_Jade licensing

I don't know if it is needed for the pilot, but we may wish to create and post a license statement on the git projects for both Rowan and GS_Jade sometime soon.

file and line number info for compiled methods

I suggest that the tonel reader either add file and line number of each method
to the metadata, or append a comment to the source string that goes into
the smalltalk compiler. Then when debugging you have info to help
validate where the source came from and debug any tool problems.

new diff expression fails

Updating yesterday, this expression fails

Rowan projectTools diff diffForProjectName: 'Rowan'

with this stack

a UserDefinedError occurred (error 2318), reason:halt, No loaded project named 'Rowan' found
UserDefinedError (AbstractException) >> _signalWith: @6 line 25
UserDefinedError (AbstractException) >> signal @2 line 47
RwGsImage class (Object) >> error: @6 line 7
[] in RwGsImage class >> loadedProjectNamed: @10 line 5
[] in RwGsImage class >> loadedProjectNamed:ifAbsent: @11 line 23
StringKeyValueDictionary >> at:ifAbsent: @15 line 10
RwGsImage class >> loadedProjectNamed:ifAbsent: @6 line 8
RwGsImage class >> loadedProjectNamed: @3 line 4
RwPrjDiffTool >> diffForProjectName: @4 line 4
Executed Code  @4 line 1
GsNMethod class >> _gsReturnToC @1 line 1

But this expression still works

(Rowan projectTools diff diffSpecUrl: 'Rowan') asString.

Need help walking through code recovery from Rowan

I lost some server code today, presumably from a bad class compilation. I only discovered it sometime later and was able to manually recover all the methods from a prior version of the class.

However, this serves as a reminder that it would be a good exercise to walk through recovering an older version of a method in Rowan. I'd like to do that next week if possible.

delete (unload) project

There are three different use cases:

  • forceDeleteProjectNamed: ... which is disown and explicit delete of classes from symbol dictionaries and extension methods ... this is to be used if there is a bug that prevents deleteProjectNamed: from working.
  • deleteProjectNamed: ... which simply does a load of the project with no packages followed by a delete of the project.
  • when the project reference is implemented, deleteProjectNamed: needs to have an option to recursively delete dependent projects, otherwise, it should fail if any other projects require the project to be deleted ... this todo item now part of issue #200

original report

I vaguely remember Dale telling me that the current code in TDRowanProjectBrowser>>deleteAllProjectsMenuAction:selectionIndex: was dangerous.

What is the proper code for removing a project from an image given only it's name?

Want to develop Rowan code in Rowan

Currently, for example, RowanPackageDefinitionService is in the Rowan-Services category. If I want to compile a method, I have to turn off the rwCompileMethod* hooks and compile the traditional way.

I want to be able to compile every method and class using a rowan api. To get there, we need to:

  • Get minimally functional GS Jade in Dolphin working (package,class, category, method add/remove)
  • Switch to Rowan API for Save of Project and Packages (save/load projects & packages)
  • Tests cannot destroy existing loaded project structure
  • Need to start using stock SymbolDictionary instead of RwGsPackageSymbolDictionary
  • automatic migration (migration options in project spec)
  • basic git commands: branches, checkout, push, pull, merge, status available from tools for building workflows
  • changelog?

Unexplained Rowan project differences

I ran

(Rowan projectTools diff diffSpecUrl: 'Rowan') asString.

but the string I got contained many changes which I didn't make.

I may just need to update but would like to walk through my check-in with you tomorrow.

Start of file -----

==================== Cypress-Core NO CHANGES  ====================
==================== Rowan-Url NO CHANGES  ====================
==================== Rowan-Core (-) --> disk (+)  ====================
Item was changed:
  ----- Method: RwLoadedProject class>>newForLoadSpecification: (in category 'instance creation') -----newForLoadSpecification: aLoadSpecification
+   ^ self new initializeForLoadSpecification: aLoadSpecification!
-   ^ self new
-     initialize;
-     initializeForLoadSpecification: aLoadSpecification;
-     yourself!


==================== Rowan-Definitions NO CHANGES  ====================
==================== Rowan-GemStone (-) --> disk (+)  ====================
Item was removed:
- ----- Method: Behavior>>rwRemoveSelector: (in category '*rowan-gemstone') -----rwRemoveSelector: methodSelector
-   ^ Rowan projectTools browser
-     removeMethod: methodSelector
-     forClassNamed: self thisClass name asString
-     isMeta: self isMeta!


==================== Rowan-Cypress NO CHANGES  ====================
==================== Rowan-Tools (-) --> disk (+)  ====================
Item was changed:
  ----- Method: RwPkgDiffTool>>patchForPackageName: (in category 'smalltalk api') -----patchForPackageName: packageName
+   | loadedPackage loadedProject |
-   | loadedPackage loadedProject repo diskSnapshot imageSnapshot |
    loadedPackage := Rowan image loadedPackageNamed: packageName.

<snip>

#loadedPackageOfClass: gives walkback

Executing this bit of smalltalk code yields a walkback:

Rowan loadedPackageOfClass: Object

MessageNotUnderstood >> defaultAction @3 line 3
MessageNotUnderstood (AbstractException) >> _signalWith: @6 line 25
MessageNotUnderstood (AbstractException) >> signal @2 line 47
RwGsLoadedPackage class (Object) >> doesNotUnderstand: @10 line 10
RwGsLoadedPackage class (Object) >> _doesNotUnderstand:args:envId:reason: @8 line 13
RwGsPlatform >> loadedPackageOfClass: @3 line 4
Rowan class >> loadedPackageOfClass: @2 line 4
Executed Code @2 line 1
GsNMethod class >> _gsReturnToC @1 line 1
~

project list window

This is an example of the menu items from the tODE project list:

image

We need to have a subset of this functionality for the hybrid browser

Running test out of the box fails

After successfully loading Rowan I tried to run a random test, RwLoadingTest>>testMethodDelete.
However, it failed with this stack. The configuration instance variable is nil. That implies some missing
setup is needed to run the tests.

MessageNotUnderstood >> defaultAction @4 line 3
MessageNotUnderstood (AbstractException) >> _signalWith: @6 line 25
MessageNotUnderstood (AbstractException) >> signal @2 line 47
UndefinedObject (Object) >> doesNotUnderstand: @10 line 10
UndefinedObject (Object) >> _doesNotUnderstand:args:envId:reason: @8 line 13
Rowan class >> updateLoadedPackages @3 line 9
Rowan class >> loadedPackagesNamed: @3 line 10
Rowan class >> loadedPackageDefinitionsNamed: @2 line 6
RwLoadingTest >> loadAndTestPackagesNamed:loaded:using: @5 line 7
RwLoadingTest >> loadAndTestPackagesNamed:using: @2 line 3
RwLoadingTest >> testMethodDelete @13 line 20
RwLoadingTest (Object) >> perform: @1 line 1
RwLoadingTest (TestCase) >> performTest @3 line 2
[] in TestCase >> runCase @14 line 5
ExecBlock0 (ExecBlock) >> ensure: @2 line 12
RwLoadingTest (TestCase) >> runCase @5 line 6
[] in TestCase >> debug @9 line 2
ExecBlock0 (ExecBlock) >> ensure: @2 line 12
RwLoadingTest (TestCase) >> debug @3 line 3
RwLoadingTest class (TestCase class) >> debug: @3 line 3
[] in JadeServer >> sbRunMethodTests: @14 line 6
Array (Collection) >> do: @6 line 10
JadeServer64bit34 (JadeServer) >> sbRunMethodTests: @9 line 6
"rowanTestStack.st" [dos] 24L, 1251C                          1,1           Top

verify that `extendedMethods` only contain newly created extension methods ... otherwise initialization logic is incorrect

The rule for running initializers is that all new or changed class-side methods with the #initialize selector should be executed with the following method:
:

runInitializers

	"run the class initialization methods as needed"

	(addedMethods copy
		addAll: extendedMethods;
		addAll: methodsNeedingRecompile;
		yourself) do: [ :methodPatch | methodPatch runInitializer ]

I believe that extendedMethodsis exclusively used for added and changed extensions methods, but we need tests to validate that the initializations are handled correctly. Note that we need to include #initialize methods being moved between packages in the test case to make sure that moves are excluded..

Need definition API for create and remove empty package

In GS Jade, a user can add and remove Rowan packages from their view. We need an api in a definition class to do both.

Creating a package means to "create from scratch."

Removing a package with classes and extensions is to be determined.

tools

This may already have been discussed, but I am bringing up for a refresher.

I think that the 'tools' references in Rowan should be hidden from the api. When I created a sample package, I ended up with code that looked like this:

        | projectService |
        projectService := RowanProjectDefinitionService new.
        projectDefinition := projectService createSampleProject.
        self browserTool removePackageNamed: self samplePackageName.
        self projectTools load loadProjectDefinition: projectDefinition.
        projectDefinition addPackageNamed: self samplePackageName.

The successive calls to browserTool and projectTools are not intuitive.

Perhaps we can discuss?

definition based equivalents to loadedProjects and loadedPackages

In order to see the list of loadedProjects & loadedPackages, I iterated over

Rowan image loadedProjects

then sending

loadedPackages

to each project.

I shouldn't be doing this. Instead, I should use a tool to get those lists. What is that api?

I couldn't find it in

RwPrjBrowserTool

nor the definition classes. You may have told me but I can't remember if you did.

SymbolDictionary does not understand #createLoadedPackageFromDefinition

I suspect I've done something wrong, but the failure is deep enough in the Rowan code that there may be something else going on.

To reproduce, file in the attached .gs file and run:
RowanMethodDefinitionService new createSampleMethod.

(Note that the attached file is .txt because GitHub won't let me attach a .gs file :( )

MessageNotUnderstood >> defaultAction @3 line 3
MessageNotUnderstood (AbstractException) >> _signalWith: @6 line 25
MessageNotUnderstood (AbstractException) >> signal @2 line 47
SymbolDictionary (Object) >> doesNotUnderstand: @10 line 10
SymbolDictionary (Object) >> _doesNotUnderstand:args:envId:reason: @8 line 13
RwGsPackageAdditionSymbolDictPatch >> createLoadedPackage @5 line 5
[] in RwGsPatchSetBasic >> addAndUpdateLoadedPackages @6 line 5
[] in Set >> do: @8 line 11
KeyValueDictionary >> keysDo: @20 line 18
Set >> do: @4 line 11
RwGsPatchSetBasic >> addAndUpdateLoadedPackages @2 line 5
RwGsPatchSetBasic >> apply @11 line 14
RwGsImage class >> applyModification: @11 line 9
RwPrjLoadTool >> loadProjectSetDefinition: @14 line 13
RwPrjLoadTool >> loadProjectDefinition: @6 line 7
RowanPackageDefinitionService >> createSamplePackage @11 line 10
RowanClassDefinitionService >> createSampleClass @5 line 5
RowanMethodDefinitionService >> createSampleMethod @5 line 6
GsNMethod class >> _gsReturnToC @1 line 1

[RowanServices.txt](https://github.com/dalehenrich/Rowan/files/1798286/RowanServices.txt)

~                                                   

RwGsPackageSymbolDictionary class is going away ... Rowan-Services has one reference

RowanService>>createSymbolDictionaryNamed: is the method with a reference to RwGsPackageSymbolDictionary. Once I've merged the issue_27 branch into master, you'll be able to create a regular SymbolDictionary in this method and the SymbolDictionary will be rowanized when it is used.

Let's talk on Monday about the best way to do this:

  1. I can write the replacement code (at the risk of getting a merge conflict when I merge issue_27 branch,
  2. You can change your code to lookup the class and when it no longer exists, use SymbolDictionary
  3. ???

I'll probably go with option 1 over the weekend since I expect to get the new SymbolDictionary code working today and I want the class to be gone at least while I am getting things working ...

Load package failed

Trying to load 'RowanSimple1' and got this walkback.

a MessageNotUnderstood occurred (error 2010), a UndefinedObject does not understand  #'asRwRepository'
MessageNotUnderstood >> defaultAction @3 line 3
MessageNotUnderstood (AbstractException) >> _signalWith: @6 line 25
MessageNotUnderstood (AbstractException) >> signal @2 line 47
UndefinedObject (Object) >> doesNotUnderstand: @10 line 10
UndefinedObject (Object) >> _doesNotUnderstand:args:envId:reason: @8 line 13
RwPrjReadTool >> readProjectSetForProjectNamed: @8 line 5
RwPrjLoadTool >> loadProjectNamed: @5 line 7
RowanProjectService >> loadProjectNamed: @4 line 3
GsNMethod class >> _gsReturnToC @1 line 1

I'm just calling this code with 'RowanSimple1'

Rowan projectTools load loadProjectNamed: aName

How to know if a project exists on disk?

What is the api for determining if a project exists on disk?

Basically, I'd like to know what information has to be present in order for this command to work:

^(Rowan projectTools diff diffSpecUrl: name) asString.

I suppose it would be good to know the api's for setting that information as well.

extension class error

Create a package named 'examples' in project 'RowanProject'.
Committed my gemstone transaction.
Then I tried to compile a method RowanPackageDefinitionService>>createPackageNamed:inProject:
Got the error below.

My code sent #rwCompileMethod: category: 'examples' to the behavior.

UserDefinedError (AbstractException) >> _signalWith: @6 line 25
UserDefinedError (AbstractException) >> signal @2 line 47
RwGsPackageSymbolDictionary (Object) >> error: @6 line 7
[] in RwGsPackageSymbolDictionary >> ensureExtensionClassNamed:existsForPackageNamed: @20 line 8
RwGsPackageSymbolDictionary (SymbolDictionary) >> at:ifAbsent: @13 line 18
RwGsPackageSymbolDictionary >> ensureExtensionClassNamed:existsForPackageNamed: @4 line 5
RwGsClassExtensionSymbolDictPatch >> installClassExtensionInSystem @17 line 16
[] in RwGsPatchSetBasic >> installAddedClassExtensions @5 line 3
[] in Set >> do: @8 line 11
KeyValueDictionary >> keysDo: @20 line 18
Set >> do: @4 line 11
RwGsPatchSetBasic >> installAddedClassExtensions @2 line 3
RwGsPatchSetBasic >> apply @15 line 19
RwGsImage class >> applyModification: @11 line 9
RwPrjLoadTool >> loadProjectSetDefinition: @14 line 13
[] in RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta:inPackageNamed: @69 line 55
RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta:inPackageNamed: @24 line 85
RwPrjBrowserTool >> addOrUpdateMethod:inProtocol:forClassNamed:isMeta: @6 line 23
RowanPackageDefinitionService class (Behavior) >> rwCompileMethod:category: @8 line 4
[] in JadeServer64bit3x >> compileMethod:behavior:symbolList:inCategory: @12 line 7
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
[] in JadeServer64bit3x >> compileMethod:behavior:symbolList:inCategory: @8 line 13
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit3x) >> compileMethod:behavior:symbolList:inCategory: @3 line 15
JadeServer64bit34 (JadeServer) >> sbSaveMethod: @13 line 9
JadeServer64bit34 (JadeServer) >> systemBrowserCommand @122 line 40
[] in JadeServer >> systemBrowserA: @23 line 10
Time class >> secondsElapsedTime: @6 line 11
Time class >> millisecondsElapsedTime: @2 line 6
JadeServer64bit34 (JadeServer) >> millisecondsElapsedTime: @2 line 3
JadeServer64bit34 (JadeServer) >> systemBrowserA: @3 line 4
JadeServer64bit34 (JadeServer) >> systemBrowser: @3 line 2
[] in JadeServer64bit >> systemBrowser: @7 line 4
ExecBlock0 (ExecBlock) >> on:do: @3 line 44
JadeServer64bit34 (JadeServer64bit) >> systemBrowser: @3 line 5
GsNMethod class >> _gsReturnToC @1 line 1

loaded package not found

I retrieve all the loadedPackages in my image with this code:

	| stream loadedProjects |

	stream := WriteStream on: String new.
	loadedProjects := Rowan image loadedProjects.
	loadedProjects do: 
			[:project |
			project loadedPackages do: 
					[:package |
					stream
						nextPutAll: package name;
						lf]].
	^stream contents

'Goo
Aaa
Foo
HybridC-Extensions
HybridC-Core
HybridB-Core
Simple-Core
Rowan-EndOfDay
Simple-Extension2
Simple-Extension1
Simple-Core
'

Then I run this code and get the error below.

Rowan image loadedPackageNamed: 'HybridC-Core'.

a UserDefinedError occurred (error 2318), reason:halt, No loaded package named 'HybridC-Core' found

Note that this package was created with a Rowan test. Not sure which.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.