Re: [Pharo-users] Changing a BaselineOf... to include one more package
Andrew Black-2 wrote >> spec >> baseline: 'SmaCC' with: [ spec loads: #('Reification' ) >> ] > > Can you tell me what this line actually means. That is, what does the > #baseline:with: method actually declare? It means load the 'Reification' group of the SmaCC project, as specified in BaselineOfSmaCC. The 'Reification' group includes the SmaCC-Reification package, and by extension its dependencies as specified by the baseline. Andrew Black-2 wrote > Where should I put this statement? In baselineOfSmaCC, or > baselineOfGrace? Why? baselineOfGrace. You're saying that SmaCC (specifically the Reification group) is a dependency of Grace. You should probably also add Smacc the the #requires: list of whatever (e.g. package(s)) requires it. Deep into Pharo (http://books.pharo.org/deep-into-pharo/) Chapter 9 gives a pretty good explanation of much of Metacello. Ignore the gopher stuff which has been replaced by the Metacello scripting API. Also, the book was written when baseline methods were in Configuration classes, whereas now for git they are reified into BaselineOf classes, but the API of the actual method is still the same so it should help clarify. - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Re: [Pharo-users] Changing a BaselineOf... to include one more package
> On 22 Jul 2018, at 19:35 , Sean P. DeNigris wrote: > > Andrew Black-2 wrote >>> spec >>> baseline: 'SmaCC-Reification' >>> with: [ spec repository: 'github://apblack/SmaCC:fglr' >>> ]. > > This line will not work. What you're saying here is load a BaselineOfXyz > where Xyz = 'SmaCC-Reification'. In fact you want to load the package. I > think you can just change the keyword #basline: to #package:, although SmaCC > has a 'Reification' group, which might be better. In any event, if you just > want to make sure that the 'SmaCC-Reification' package is loaded when you > load SmaCC, then I think what you're after is: > spec > baseline: 'SmaCC' with: [ spec loads: #('Reification' ) > ] > > I think the above would replace both of your SmaCC-related lines (you can > specify multiple entities in to #loads: if needed. > > NB. the preferred syntax in a baseline is literal arrays like above i.e. #() > instead of curly-brace runtime arrays like {'Grace-Tests' . 'Grace-Ast'} > Thanks for the suggestions. But now I am more confused than ever! Can you tell me what this line actually means. That is, what does the #baseline:with: method actually declare? Where should I put this statement? In baselineOfSmaCC, or baselineOfGrace? Why? Note that the SmaCC-Reification package is not part of the current normal load for SmaCC — that’s why I have to specify it separately. Is this declaration saying the opposite? If not, what is it saying? Earlier, you wrote: >> spec package: 'SmaCC-Reification' with: [ spec requires: >> #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ] AFAICT this is not necessary because these dependencies are declared in BaselineOfSmaCC. These declarations are the very lines from baselineOfSmaCC that declare these dependencies — aren’t they? If I take them out, how will Metacello know that loading SmaCC-Reification requires the three packages listed in the array? I’m sorry if I sound frustrated — none of this makes any sense to me. There seems to be no documentation other than the very high-level stuff that describes th eoverall purpose of package dependencies — which I think that I understand. Andrew
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Andrew Black-2 wrote >> spec >> baseline: 'SmaCC-Reification' >> with: [ spec repository: 'github://apblack/SmaCC:fglr' >> ]. This line will not work. What you're saying here is load a BaselineOfXyz where Xyz = 'SmaCC-Reification'. In fact you want to load the package. I think you can just change the keyword #basline: to #package:, although SmaCC has a 'Reification' group, which might be better. In any event, if you just want to make sure that the 'SmaCC-Reification' package is loaded when you load SmaCC, then I think what you're after is: spec baseline: 'SmaCC' with: [ spec loads: #('Reification' ) ] I think the above would replace both of your SmaCC-related lines (you can specify multiple entities in to #loads: if needed. NB. the preferred syntax in a baseline is literal arrays like above i.e. #() instead of curly-brace runtime arrays like {'Grace-Tests' . 'Grace-Ast'} - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Guillermo Polito wrote >> But then I must also specify the dependencies of the SmaCC-Reification >> package, so I need to add >> >> spec package: 'SmaCC-Reification' with: [ spec requires: >> #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ] AFAICT this is not necessary because these dependencies are declared in BaselineOfSmaCC. In fact the whole point of Metacello is that you can refer just to the specific entity within a project you want to load and Metacello should take care of bringing along all its dependencies. - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Re: [Pharo-users] Changing a BaselineOf... to include one more package
> On 21 Jul 2018, at 08:22 , Sean P. DeNigris wrote: > > Andrew P. Black wrote >> I don’t know what else to try! > > From the error message: >Could not resolve: BaselineOfSmaCC-Reification... in > https://github.com/apblack/SmaCC.git[working] > > I'm guessing that you can't load from two different branches of the same git > repo. Can you fork the project and create a new branch that merges in the > required changes from the 'working' and 'fglr' branches? Good trysuggestion Sean. I think that there may indeed be some brokenness in the way that Pharo uses git, so that the branch spec in the baseline is not always obeyed. So I switched both of the dependencies to be on the same branch (fglr), and for good measure switched my local repo to also be on that branch. > spec > baseline: 'SmaCC' > with: [ spec repository: 'github://apblack/SmaCC:fglr' > ]. > spec > baseline: 'SmaCC-Reification' > with: [ spec repository: 'github://apblack/SmaCC:fglr' > ]. The result? Nothing changes. I still get a complaint Could not resolve: BaselineOfSmaCC-Reification [BaselineOfSmaCC-Reification] in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace 33/pharo-local/package-cache g...@github.com:apblack/SmaCC.git[fglr] In the git directory I can see > silverstone: ~/iceberg/apblack/SmaCC$ ls -d SmaCC-Reification.package/ > SmaCC-Reification.package/ > silverstone: ~/iceberg/apblack/SmaCC$ git br > * fglr > ... Is it supposed to be looking for `BaselineOfSmaCC-Reification` rather than for `SmaCC-Reification`? There is no `BaselineOfSmaCC-Reification`, just a `BaselineOfSmaCC` that defines a group called `SmaCC-Refication`. (I did try replacing baseline: ‘SmaCC-Reification’ by group: ‘SmaCC-Reification’ , but that gave a different error.) Andrew
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Andrew P. Black wrote > I don’t know what else to try! >From the error message: Could not resolve: BaselineOfSmaCC-Reification... in https://github.com/apblack/SmaCC.git[working] I'm guessing that you can't load from two different branches of the same git repo. Can you fork the project and create a new branch that merges in the required changes from the 'working' and 'fglr' branches? - Cheers, Sean -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html
Re: [Pharo-users] Changing a BaselineOf... to include one more package
I’ve spent another couple of hours on this, and here is where I stand. I can get SmaCC-Reification to load if I use the "load ...” menu in the Montecello extension menu to Iceberg — but only if I select the fglr branch manually. (this is reasonable, because that group is not on the working branch) I can’t get SmaCC-Reification to load as a dependency for Grace-Parser. I’ve tried pushing everything back to github. I’ve tried temporarily moving my git repos into the image directory (i.e., I’ve turned off the Iceberg setting to use a shared iceberg directory.) I still get > Could not resolve: BaselineOfSmaCC-Reification [BaselineOfSmaCC-Reification] > in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace > 33/pharo-local/package-cache g...@github.com:apblack/SmaCC.git[fglr] I get this message even after I have loaded SmaCC-Reification by hand. I don’t know what else to try! My repo is on github: apblack/GraceInPharo.I’m stranded until I can get this working. Andrew
Re: [Pharo-users] Changing a BaselineOf... to include one more package
> On 16 Jul 2018, at 07:27 , Guillermo Polito wrote: > > - I've cloned SmaCC > - I've checked out the flgr branch > - I've loaded the baseline and added > >> spec package: 'SmaCC-Reification' with: [ spec requires: >> #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ] > - then, I've done right click on the iceberg project and selected Metacello > -> load baseline... => then inserted SmaCC-Reification and I got that package > + dependencies loaded... Well, I thought that was what I did before. I tried this again, and — lo and behold — it worked! Thank you. > > > Moreover, my original problem is still there — it's looking in a nonexistent > package cache, rather than on github, or in my ~/iceberg/apblack/SmaCC clone > of github. > > I don't think this is quite like that... Metacello will try to lookup the > package in several places. And it will check at last the package cache. So it > fails because it was not able to found that package in any of your > repositories, but the last it checked was the package cache. What still is not working is trying to reference SmaCC-Reficiation from baselineOfGrace. In `baselineOfGrace` I’ve put: spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ] but I still get the walkback > Could not resolve: BaselineOfSmaCC-Reification [BaselineOfSmaCC-Reification] > in /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace > 32/pharo-local/package-cache g...@github.com:apblack/SmaCC.git[fglr] I took that message to mean that it was listing all the places that it had looked: first the non-existant package cache, and then githib. Is that wrong? Is it actually looking in my shared iceberg directory, but just not saying so? Does this only work after I have pushed everything to github? I like to get it working before I push. Andrew
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Hi Andrew, Sorry for the late reply, On Wed, Jul 11, 2018 at 4:31 PM Andrew P. Black wrote: > Hi Guillermo, > > Thanks for the explanation. I guess that I really don't have much idea > how this baseline stuff is supposed to work, so when it fails, I don't know > where to look. > > My initial question was about why iceberg (or Metacello?) was looking in > the wrong directory, but that seems to have been the wrong question. > > So, you are right; the BaselineOfSmaCC has not been updated to include the > SmaCC-Reification package, which is new (and experimental). So it seems > that I have to add it. Here is the current baseline: > > BaselineOfSmaCC >> baseline: spec > > spec > for: #common > do: [ spec blessing: #baseline. > spec > package: 'SmaCC-Source-Editing'; > package: 'SmaCC-Runtime'; > package: 'SmaCC-GLR-Runtime' > with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Debugging-Support' > with: [ spec requires: 'SmaCC-Development' ]. > spec > package: 'SmaCC-Development' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]. > spec > for: #Alt > do: [ spec > package: 'SmaCC-Alt' with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Development-UI' > with: [ spec > requires: #('SmaCC-Development' 'SmaCC-Alt' 'SmaCC-Debugging-Support') ] ]. > spec > for: #NoAlt > do: [ spec > package: 'SmaCC-Development-UI' > with: [ spec requires: #('SmaCC-Development' 'SmaCC-Debugging-Support') ] > ]. > spec > package: 'SmaCC-Tests' > with: [ spec requires: 'SmaCC-Development' ]; > package: 'SmaCC-Browser' with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Parse-Tree-Comparison' > with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Rewrite-Engine' > with: [ spec > requires: #('SmaCC-GLR-Runtime' 'SmaCC-Source-Editing' 'SmaCC-CSV-Parser') > ]; > package: 'SmaCC-Rewrite-Engine-Tests' > with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; > package: 'SmaCC-Rewrite-Engine-Command-Line' > with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; > package: 'SmaCC-Rewrite-Server'; > package: 'SmaCC-Rewrite-Server-Worker' > with: [ spec requires: 'SmaCC-Rewrite-Engine' ]; > package: 'SmaCC-Swift' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-Smalltalk-Parser' > with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Generic-Smalltalk-Parser' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-C-Parser' > with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-CSV-Parser' > with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-CSharp' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-Cucumber' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-Javascript-Parser' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-Java' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-Python' with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Python-Tests' > with: [ spec requires: 'SmaCC-Python' ]; > package: 'SmaCC-Line-Parser' > with: [ spec requires: 'SmaCC-Runtime' ]; > package: 'SmaCC-Delphi' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-DelphiForms' > with: [ spec requires: 'SmaCC-GLR-Runtime' ]; > package: 'SmaCC-IDL' with: [ spec requires: 'SmaCC-Runtime' ]. > spec > group: 'default' with: #('Tools'); > group: 'Runtime' with: #('SmaCC-GLR-Runtime'); > group: 'Rewrite' with: #('SmaCC-Rewrite-Engine'); > group: 'Rewrite-Server' > with: > #('SmaCC-Rewrite-Server-Worker' 'SmaCC-Rewrite-Server' 'Rewrite' > 'SmaCC-Rewrite-Engine-Command-Line'); > group: 'Tools' > with: > #('SmaCC-Development-UI' 'Examples' 'Rewrite' > 'SmaCC-Parse-Tree-Comparison'); > group: 'Debugging' with: #('SmaCC-Debugging-Support'); > group: 'Examples' > with: > #('SmaCC-Smalltalk-Parser' 'SmaCC-C-Parser' 'SmaCC-Java' > 'SmaCC-CSV-Parser' 'SmaCC-Line-Parser'); > group: 'Examples-Extra' > with: > #('SmaCC-IDL' 'SmaCC-CSharp' 'SmaCC-Cucumber' 'SmaCC-Swift' 'SmaCC-Delphi' > 'SmaCC-DelphiForms' 'SmaCC-Python' 'SmaCC-Javascript-Parser'); > group: 'Tests' > with: #('SmaCC-Tests' 'SmaCC-Rewrite-Engine-Tests' 'SmaCC-Python-Tests') ] > > > Should I add a new group, something like > > spec group: 'Reification' > > with: #('SmaCC-Reification') > > > But then I must also specify the dependencies of the SmaCC-Reification > package, so I need to add > > spec package: 'SmaCC-Reification' with: [ spec requires: > #('SmaCC-Smalltalk-Parser' 'SmaCC-Runtime' 'SmaCC-Java') ] > > > (I assumed that this would go earlier in the method, with the other > package specs. So I put it right after package: 'SmaCC-IDL') > Yep. You must do both :). Also, I think the order is not important, they are just declarations, the engine takes care of calculating the order later. > > Once I've done that, I tried to load the BaselineOfSmaCC again, and I find > that I've broken it. I get a walkback with the message > "Could not resolve: SmaCC-Reification [SmaCC-Reification] in > /Users/black/Development/Pharo/images/Pharo 7.0 SmallGrace >
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Any more ideas o how to get this working? Andrew > On 11 Jul 2018, at 7:30, Andrew P. Black wrote: > > Hi Guillermo, > > Thanks for the explanation. I guess that I really don't have much idea how > this baseline stuff is supposed to work, so when it fails, I don't know where > to look. > > My initial question was about why iceberg (or Metacello?) was looking in the > wrong directory, but that seems to have been the wrong question. > > So, you are right; the BaselineOfSmaCC has not been updated to include the > SmaCC-Reification package, which is new (and experimental). So it seems that > I have to add it. Here is the current baseline: > >> BaselineOfSmaCC >> baseline: spec >> >> spec >> for: #common >> do: [ spec blessing: #baseline. >> spec >> package: 'SmaCC-Source-Editing'; >> package: 'SmaCC-Runtime'; >> package: 'SmaCC-GLR-Runtime' >> with: [ spec requires: 'SmaCC-Runtime' >> ]; >> package: 'SmaCC-Debugging-Support' >> with: [ spec requires: >> 'SmaCC-Development' ]. >> spec >> package: 'SmaCC-Development' >> with: [ spec requires: 'SmaCC-GLR-Runtime' ]. >> spec >> for: #Alt >> do: [ spec >> package: 'SmaCC-Alt' with: [ >> spec requires: 'SmaCC-Runtime' ]; >> package: 'SmaCC-Development-UI' >> with: [ spec >> requires: >> #('SmaCC-Development' 'SmaCC-Alt' 'SmaCC-Debugging-Support') ] ]. >> spec >> for: #NoAlt >> do: [ spec >> package: 'SmaCC-Development-UI' >> with: [ spec requires: >> #('SmaCC-Development' 'SmaCC-Debugging-Support') ] ]. >> spec >> package: 'SmaCC-Tests' >> with: [ spec requires: >> 'SmaCC-Development' ]; >> package: 'SmaCC-Browser' with: [ spec requires: >> 'SmaCC-Runtime' ]; >> package: 'SmaCC-Parse-Tree-Comparison' >> with: [ spec requires: 'SmaCC-Runtime' >> ]; >> package: 'SmaCC-Rewrite-Engine' >> with: [ spec >> requires: #('SmaCC-GLR-Runtime' >> 'SmaCC-Source-Editing' 'SmaCC-CSV-Parser') ]; >> package: 'SmaCC-Rewrite-Engine-Tests' >> with: [ spec requires: >> 'SmaCC-Rewrite-Engine' ]; >> package: 'SmaCC-Rewrite-Engine-Command-Line' >> with: [ spec requires: >> 'SmaCC-Rewrite-Engine' ]; >> package: 'SmaCC-Rewrite-Server'; >> package: 'SmaCC-Rewrite-Server-Worker' >> with: [ spec requires: >> 'SmaCC-Rewrite-Engine' ]; >> package: 'SmaCC-Swift' >> with: [ spec requires: >> 'SmaCC-GLR-Runtime' ]; >> package: 'SmaCC-Smalltalk-Parser' >> with: [ spec requires: 'SmaCC-Runtime' >> ]; >> package: 'SmaCC-Generic-Smalltalk-Parser' >> with: [ spec requires: >> 'SmaCC-GLR-Runtime' ]; >> package: 'SmaCC-C-Parser' >> with: [ spec requires: 'SmaCC-Runtime' >> ]; >> package: 'SmaCC-CSV-Parser' >> with: [ spec requires: 'SmaCC-Runtime' >> ]; >> package: 'SmaCC-CSharp' >> with: [ spec requires: >> 'SmaCC-GLR-Runtime' ]; >> package: 'SmaCC-Cucumber' >> with: [ spec requires: >> 'SmaCC-GLR-Runtime' ]; >> package: 'SmaCC-Javascript-Parser' >> with: [ spec requires: >> 'SmaCC-GLR-Runtime' ]; >> package: 'SmaCC-Java' >> with: [ spec requires: >> 'SmaCC-GLR-Runtime' ]; >> package: 'SmaCC-Python' with: [ spec requires: >> 'SmaCC-Runtime' ]; >>
Re: [Pharo-users] Changing a BaselineOf... to include one more package
To give a bit more of insight (and fill some holes in my explanation because I couldn't finish my coffee yet :)), actually, your baseline does not work because in the metacello spec you're saying that 'SmaCC-Reification' resides in Grace's repository, which is wrong I assume. So metacello will try to load that dependency (and fail) and so, it will fail to load Grace-Parser (transitivity...). And now that I think it better, even putting spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ]. Is wrong. - First thing is to see if SmaCC exports SmaCC-Reification by default or in a separate group. - If SmaCC-Reification is downloaded by default, you just need spec package: 'Grace-Parser' with: [ spec requires: {'SmaCC' . 'Grace-Scope'} ]. - If SmaCC-Reification is in a non-default group, you probably want to add spec baseline: 'SmaCC-Reification' with: [ spec repository: 'github://apblack/SmaCC:working'; loads: #( 'NAME-OF-YOUR-REIFICATION-GROUP' ) ]. And then your packages can depend on it. - IF SmaCC-Reification is not in the SmaCC baseline, then, there is nothing you can do, but to add it :) On Mon, Jul 9, 2018 at 9:29 AM Guillermo Polito wrote: > Hi Andrew, > > I'd say you got almost everything right. Let me try to guide you to fix > what's not so well and see if you can make it work. > > On Sun, Jul 8, 2018 at 4:19 PM Andrew P. Black wrote: > >> I have a baselineOfGrace that has been working fine for some time: >> >> baseline: spec >> >> >> spec for: #'common' do: [ >> spec >> baseline: 'SmaCC' >> with: [ spec repository: 'github://apblack/SmaCC:working' ]. >> spec >> baseline: 'FileDialog' >> with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. >> spec package: 'Grace-Scope'. >> spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . >> 'Grace-Scope'} ]. >> spec package: 'Grace-Parser' with: [ >> spec requires: {'SmaCC' . 'Grace-Scope'} ]. >> spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. >> spec package: 'Grace-IDE' with: [ >> spec requires: {'FileDialog' . 'Grace-Compiler'} ]. >> spec package: 'Grace-Compiler' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names'} ]. >> spec package: 'Grace-Tests' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. >> spec package: 'Grace-Types' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. >> spec package: 'Grace-TypeTests' with: [ >> spec requires: {'Grace-Tests' . 'Grace-Types' } ]. >> spec package: 'Grace-Ast' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . >> 'Grace-Types'} ]. >> spec package: 'Grace-AstTests' with: [ >> spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. >> ] >> >> >> Now I have added a dependency from the package ‘Grace-Parser’ on the >> package 'SmaCC-Reification’. The latter exists *only* within the branch >> SmaCC called ‘fglr’. So I have changed my >> baseline to the following: >> >> baseline: spec >> >> >> spec for: #'common' do: [ >> spec >> baseline: 'SmaCC' >> with: [ spec repository: 'github://apblack/SmaCC:fglr' ]. >> >> 1) This is perfect. > >> spec >> baseline: 'FileDialog' >> with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. >> spec package: 'Grace-Scope'. >> spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . >> 'Grace-Scope'} ]. >> spec package: 'Grace-Parser' with: [ >> spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ]. >> >> 2) This... It depends: Does the BaselineOfSmaCC export a package/group > with that name? > When you import another project, you should think a baseline as a kind of > black box, where the only things you can import are those declared in the > baseline. If that baseline loads other stuff you don't care. > > In other words, this means that the BaselineOfSmaCC that lives in the > `fglr` branch needs to have a `spec package: 'SmaCC-Reification'` > expression to work. > > >> spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. >> spec package: 'Grace-IDE' with: [ >> spec requires: {'FileDialog' . 'Grace-Compiler'} ]. >> spec package: 'Grace-Compiler' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names'} ]. >> spec package: 'Grace-Tests' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. >> spec package: 'Grace-Types' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. >> spec package: 'Grace-TypeTests' with: [ >> spec requires: {'Grace-Tests' . 'Grace-Types' } ]. >> spec package: 'Grace-Ast' with: [ >> spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . >> 'Grace-Types'} ]. >> spec package: 'Grace-AstTests' with: [ >> spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. >> spec package: 'SmaCC-Reification'. >> >> 3) And this is wrong :). You don't need to specify external packages like > this. > It's not up to your baseline to load SmaCC stuff. Your
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Hi Andrew, I'd say you got almost everything right. Let me try to guide you to fix what's not so well and see if you can make it work. On Sun, Jul 8, 2018 at 4:19 PM Andrew P. Black wrote: > I have a baselineOfGrace that has been working fine for some time: > > baseline: spec > > > spec for: #'common' do: [ > spec > baseline: 'SmaCC' > with: [ spec repository: 'github://apblack/SmaCC:working' ]. > spec > baseline: 'FileDialog' > with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. > spec package: 'Grace-Scope'. > spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . > 'Grace-Scope'} ]. > spec package: 'Grace-Parser' with: [ > spec requires: {'SmaCC' . 'Grace-Scope'} ]. > spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. > spec package: 'Grace-IDE' with: [ > spec requires: {'FileDialog' . 'Grace-Compiler'} ]. > spec package: 'Grace-Compiler' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names'} ]. > spec package: 'Grace-Tests' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. > spec package: 'Grace-Types' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. > spec package: 'Grace-TypeTests' with: [ > spec requires: {'Grace-Tests' . 'Grace-Types' } ]. > spec package: 'Grace-Ast' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . > 'Grace-Types'} ]. > spec package: 'Grace-AstTests' with: [ > spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. > ] > > > Now I have added a dependency from the package ‘Grace-Parser’ on the > package 'SmaCC-Reification’. The latter exists *only* within the branch > SmaCC called ‘fglr’. So I have changed my > baseline to the following: > > baseline: spec > > > spec for: #'common' do: [ > spec > baseline: 'SmaCC' > with: [ spec repository: 'github://apblack/SmaCC:fglr' ]. > > 1) This is perfect. > spec > baseline: 'FileDialog' > with: [ spec repository: 'github://peteruhnak/file-dialog/repository' ]. > spec package: 'Grace-Scope'. > spec package: 'Grace-Names' with: [ spec requires: {'Grace-Parser' . > 'Grace-Scope'} ]. > spec package: 'Grace-Parser' with: [ > spec requires: {'SmaCC' . 'SmaCC-Reification'. 'Grace-Scope'} ]. > > 2) This... It depends: Does the BaselineOfSmaCC export a package/group with that name? When you import another project, you should think a baseline as a kind of black box, where the only things you can import are those declared in the baseline. If that baseline loads other stuff you don't care. In other words, this means that the BaselineOfSmaCC that lives in the `fglr` branch needs to have a `spec package: 'SmaCC-Reification'` expression to work. > spec package: 'Grace-HValidator' with: [ spec requires: {'SmaCC' } ]. > spec package: 'Grace-IDE' with: [ > spec requires: {'FileDialog' . 'Grace-Compiler'} ]. > spec package: 'Grace-Compiler' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names'} ]. > spec package: 'Grace-Tests' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-HValidator'} ]. > spec package: 'Grace-Types' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope'} ]. > spec package: 'Grace-TypeTests' with: [ > spec requires: {'Grace-Tests' . 'Grace-Types' } ]. > spec package: 'Grace-Ast' with: [ > spec requires: {'Grace-Parser' . 'Grace-Names' . 'Grace-Scope' . > 'Grace-Types'} ]. > spec package: 'Grace-AstTests' with: [ > spec requires: {'Grace-Tests' . 'Grace-Ast'} ]. > spec package: 'SmaCC-Reification'. > > 3) And this is wrong :). You don't need to specify external packages like this. It's not up to your baseline to load SmaCC stuff. Your baseline describes things in your grace repository. It's up to SmaCC's baseline to describe every loadable unit (package, group...) that you can depend on. So in summary, you should do 1) and 2) in BaselineOfGrace and make sure that 3) is done in BaselineOfSmacc. Keep us posted! Guille
Re: [Pharo-users] Changing a BaselineOf... to include one more package
Seems like its not looking in your iceberg directory/subdirectories for the SmaCC-Reification package. Just the package-cache and on github. Did you try adding a SmaCC-Reification specific repository declaration yet to your baseline? e.g. spec package: 'SmaCC-Reification' with:[ spec repository:'/my/full/path/iceberg/apblack/SmaCC'] I'm definitely in the "fiddle around with stuff until it works" level of competency on Baselines so there may be a better (correct :) ) way. -- Sent from: http://forum.world.st/Pharo-Smalltalk-Users-f1310670.html