diff --git a/.github/workflows/base.yaml b/.github/workflows/base.yaml index 7eced6b6..0897802b 100644 --- a/.github/workflows/base.yaml +++ b/.github/workflows/base.yaml @@ -8,11 +8,15 @@ on: configs: required: true type: string + branch: + required: false + default: master + type: string jobs: build: name: "Build ${{ matrix.smalltalk }} ${{ matrix.config }}" if: ${{!contains(github.event.commits[0].message, '[docs]')}} - runs-on: ubuntu-20.04 + runs-on: ubuntu-24.04 strategy: fail-fast: false matrix: @@ -20,6 +24,8 @@ jobs: config: ${{ fromJSON(inputs.configs) }} steps: - uses: actions/checkout@v3 + with: + ref: ${{ inputs.branch }} - uses: hpi-swa/setup-smalltalkCI@v1 with: smalltalk-image: ${{ matrix.smalltalk }} diff --git a/.github/workflows/gh-pages.yaml b/.github/workflows/gh-pages.yaml index fba7584d..a99db07b 100644 --- a/.github/workflows/gh-pages.yaml +++ b/.github/workflows/gh-pages.yaml @@ -8,7 +8,7 @@ on: jobs: deploy: - runs-on: ubuntu-20.04 + runs-on: ubuntu-latest if: ${{contains(join(github.event.commits.*.message), '[docs]')}} steps: - uses: actions/checkout@v2 diff --git a/.github/workflows/pharo-alpha.yaml b/.github/workflows/pharo-11.0.yaml similarity index 81% rename from .github/workflows/pharo-alpha.yaml rename to .github/workflows/pharo-11.0.yaml index 195c10f6..4e4c909e 100644 --- a/.github/workflows/pharo-alpha.yaml +++ b/.github/workflows/pharo-11.0.yaml @@ -1,4 +1,4 @@ -name: Build Pharo alpha +name: Build Pharo 11.0 on: push: pull_request: @@ -12,8 +12,8 @@ on: workflow_dispatch: jobs: build: - name: Build Pharo alpha + name: Build Pharo 11.0 uses: theseion/fuel/.github/workflows/base.yaml@master with: - build_targets: '["Pharo64-alpha"]' + build_targets: '["Pharo64-11"]' configs: '[".default.ston", ".tests.ston", ".debug.ston", ".developmentgroup.ston"]' \ No newline at end of file diff --git a/.github/workflows/pharo-12.0.yaml b/.github/workflows/pharo-12.0.yaml new file mode 100644 index 00000000..af58d52e --- /dev/null +++ b/.github/workflows/pharo-12.0.yaml @@ -0,0 +1,24 @@ +name: Build Pharo 12.0 +on: + push: + branches: + - Pharo12 + pull_request_target: + branches: + - Pharo12 + schedule: + # Minute [0,59] + # Hour [0,23] + # Day of the month [1,31] + # Month of the year [1,12] + # Day of the week ([0,6] with 0=Sunday) + - cron: '17 4 * * 6' + workflow_dispatch: +jobs: + build: + name: Build Pharo 12.0 + uses: theseion/fuel/.github/workflows/base.yaml@master + with: + build_targets: '["Pharo64-12"]' + configs: '[".default.ston", ".tests.ston"]' + branch: Pharo12 \ No newline at end of file diff --git a/.github/workflows/pharo-13.0.yaml b/.github/workflows/pharo-13.0.yaml new file mode 100644 index 00000000..e9675f72 --- /dev/null +++ b/.github/workflows/pharo-13.0.yaml @@ -0,0 +1,24 @@ +name: Build Pharo 13.0 +on: + push: + branches: + - Pharo13 + pull_request_target: + branches: + - Pharo13 + schedule: + # Minute [0,59] + # Hour [0,23] + # Day of the month [1,31] + # Month of the year [1,12] + # Day of the week ([0,6] with 0=Sunday) + - cron: '37 4 * * 6' + workflow_dispatch: +jobs: + build: + name: Build Pharo 13.0 + uses: theseion/fuel/.github/workflows/base.yaml@master + with: + build_targets: '["Pharo64-13"]' + configs: '[".default.ston", ".tests.ston"]' + branch: Pharo13 \ No newline at end of file diff --git a/.github/workflows/pharo-14.0.yaml b/.github/workflows/pharo-14.0.yaml new file mode 100644 index 00000000..70a9c34d --- /dev/null +++ b/.github/workflows/pharo-14.0.yaml @@ -0,0 +1,24 @@ +name: Build Pharo 14.0 +on: + push: + branches: + - Pharo14 + pull_request_target: + branches: + - Pharo14 + schedule: + # Minute [0,59] + # Hour [0,23] + # Day of the month [1,31] + # Month of the year [1,12] + # Day of the week ([0,6] with 0=Sunday) + - cron: '37 4 * * 6' + workflow_dispatch: +jobs: + build: + name: Build Pharo 14.0 + uses: theseion/fuel/.github/workflows/base.yaml@master + with: + build_targets: '["Pharo64-alpha"]' + configs: '[".default.ston", ".tests.ston"]' + branch: Pharo14 \ No newline at end of file diff --git a/README.md b/README.md index 27230c3e..698f6231 100644 --- a/README.md +++ b/README.md @@ -27,29 +27,26 @@ We would love to see your project here too ;)! # Status of automated builds ### Pharo -master | 5.2.0 | 5.1.0 | 5.0.6 | 4.1.1 | 3.0.4 | 3.0.3 | 3.0.2 | 3.0.1 | 3.0.0 | 2.2.0 - ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------- | ------------ | ------------- | ------------ | ------------- -[![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=master&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | [![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=5.2.0&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | [![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=5.1.0&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | [![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=5.0.6&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | [![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=4.1.1&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | [![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=3.0.4&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | [![Build status: Pharo alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-alpha.yaml?branch=3.0.3&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-alpha.yaml) | - | - | - | - | - | -[![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=master&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=5.2.0&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=5.1.0&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=5.0.6&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=4.1.1&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=3.0.4&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=3.0.3&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | - | - | - | - | - | -[![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=master&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=5.2.0&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=5.1.0&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=5.0.6&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=4.1.1&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=3.0.4&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=3.0.3&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | - | - | - | - | - | -[![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=master&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=5.2.0&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=5.1.0&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=5.0.6&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=4.1.1&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=3.0.4&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=3.0.3&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | - | - | - | - | - | -[![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=master&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=5.2.0&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=5.1.0&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=5.0.6&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=4.1.1&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=3.0.4&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=3.0.3&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.2&env=BUILD_NAME=Pharo64-7.0&label=7.0)](http://travis-ci.org/theseion/Fuel) | [![Build status: Pharo 7.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.1&env=BUILD_NAME=Pharo64-7.0&label=7.0)](http://travis-ci.org/theseion/Fuel) | [![Build status: Pharo-7.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.0&env=BUILD_NAME=Pharo-7.0&label=7.0)](http://travis-ci.org/theseion/Fuel) | [![Build status: Pharo-7.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Pharo-7.0&label=7.0)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Pharo-6.1](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Pharo-6.1&label=6.1)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Pharo-6.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Pharo-6.0&label=6.0)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Pharo-5.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Pharo-5.0&label=5.0)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Pharo-4.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Pharo-4.0&label=4.0)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Pharo-3.0](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Pharo-3.0&label=3.0)](http://travis-ci.org/theseion/Fuel) + +[![Build status: Pharo 14 (alpha)](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-14.0.yaml?branch=Pharo14&label=Pharo%2014%20(alpha)&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-14.0.yaml) +[![Build status: Pharo 13](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-13.0.yaml?branch=Pharo13&label=Pharo%201&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-13.0.yaml) +[![Build status: Pharo 12](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-12.0.yaml?branch=Pharo12&label=Pharo%2012&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-12.0.yaml) + +master | 5.2.2 | 5.1.0 | 5.0.6 | 4.1.1 | 3.0.4 | 3.0.3 | + ------------ | ------------ | ------------ | ------------ | ------------ | ------------ | ------------- | +[![Build status: Pharo 11.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-11.0.yaml?branch=master&label=11.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-11.0.yaml) | [![Build status: Pharo 11.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-11.0.yaml?branch=5.2.2&label=11.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-11.0.yaml) | - | - | - | - | - | +[![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=master&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=5.2.2&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=5.1.0&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=5.0.6&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=4.1.1&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=3.0.4&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | [![Build status: Pharo 10.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-10.0.yaml?branch=3.0.3&label=10.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-10.0.yaml) | +[![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=master&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=5.2.2&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=5.1.0&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=5.0.6&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=4.1.1&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=3.0.4&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | [![Build status: Pharo 9.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-9.0.yaml?branch=3.0.3&label=9.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-9.0.yaml) | +[![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=master&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=5.2.2&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=5.1.0&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=5.0.6&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=4.1.1&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=3.0.4&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | [![Build status: Pharo 8.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-8.0.yaml?branch=3.0.3&label=8.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-8.0.yaml) | +[![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=master&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=5.2.2&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=5.1.0&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=5.0.6&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=4.1.1&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=3.0.4&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | [![Build status: Pharo 7.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/pharo-7.0.yaml?branch=3.0.3&label=7.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/pharo-7.0.yaml) | ### Squeak -master | 5.2.0 | 5.1.0 | 5.0.6 | 4.1.1 | 3.0.4 | 3.0.3 | 3.0.2 | 3.0.1 | 3.0.0 | 2.2.0 -------------- | ------------- | ------------- | ------------- | ----------- | ------------ | ------------- | ------------ | ------------- | ------------ | ------------- -[![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=master&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | [![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=5.2.0&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | [![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=5.1.0&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | [![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=5.0.6&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | - | - | - | - | - | - | - | -[![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=master&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | [![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=5.2.0&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | [![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=5.1.0&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | [![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=5.0.6&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | - | - | - | - | - | - | - | -[![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=master&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=5.2.0&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=5.1.0&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=5.0.6&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=4.1.1&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=3.0.4&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=3.0.3&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak-5.3, 64-bits](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.2&env=BUILD_NAME=Squeak64-5.3&label=5.3)](http://travis-ci.org/theseion/Fuel) | [![Build status: Squeak-5.3](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.1&env=BUILD_NAME=Squeak64-5.3&label=5.3)](http://travis-ci.org/theseion/Fuel) | - | - | -[![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=master&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=5.2.0&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=5.1.0&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=5.0.6&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=4.1.1&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=3.0.4&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=3.0.3&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak-5.2, 64-bits](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.2&env=BUILD_NAME=Squeak64-5.2&label=5.2)](http://travis-ci.org/theseion/Fuel) | [![Build status: Squeak-5.2, 64-bits](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.1&env=BUILD_NAME=Squeak64-5.2&label=5.2)](http://travis-ci.org/theseion/Fuel) | [![Build status: Squeak-5.2, 64-bits](http://badges.herokuapp.com/travis/theseion/Fuel?branch=3.0.0&env=BUILD_NAME=Squeak-5.2&label=5.2)](http://travis-ci.org/theseion/Fuel) | - | -| - | - | - | - | - | - | - | - | - | [![Build status: Squeak-5.1](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Squeak-5.1&label=5.1)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Squeak-4.6](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Squeak-4.6&label=4.6)](http://travis-ci.org/theseion/Fuel) -| - | - | - | - | - | - | - | - | - | [![Build status: Squeak-4.5](http://badges.herokuapp.com/travis/theseion/Fuel?branch=2.2.0&env=BUILD_NAME=Squeak-4.5&label=4.5)](http://travis-ci.org/theseion/Fuel) +master | 5.2.2 | 5.1.0 | 5.0.6 | 4.1.1 | 3.0.4 | 3.0.3 | +------------- | ------------- | ------------- | ------------- | ----------- | ------------ | ------------- | +[![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=master&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | [![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=5.2.2&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | [![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=5.1.0&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | [![Build status: Squeak alpha](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-alpha.yaml?branch=5.0.6&label=alpha&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-alpha.yaml) | +[![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=master&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | [![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=5.2.2&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | [![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=5.1.0&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | [![Build status: Squeak 6.0](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-6.0.yaml?branch=5.0.6&label=6.0&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-6.0.yaml) | +[![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=master&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=5.2.2&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=5.1.0&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=5.0.6&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=4.1.1&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=3.0.4&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | [![Build status: Squeak 5.3](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.3.yaml?branch=3.0.3&label=5.3&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.3.yaml) | +[![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=master&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=5.2.2&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=5.1.0&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=5.0.6&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=4.1.1&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=3.0.4&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | [![Build status: Squeak 5.2](https://img.shields.io/github/actions/workflow/status/theseion/fuel/squeak-5.2.yaml?branch=3.0.3&label=5.2&logo=github)](https://github.com/theseion/Fuel/actions/workflows/squeak-5.2.yaml) | # Properties - Binary format. @@ -66,10 +63,21 @@ master | 5.2.0 | 5.1.0 | 5.0.6 | 4.1.1 | 3.0.4 | 3.0.3 | 3.0.2 | 3.0.1 | 3.0.0 | # Installation +## Pharo >= 12 +As of Pharo 12, Fuel will no longer be backwards compatible and each version +will live on a separate branch. + +``` +Metacello new + repository: 'github://theseion/Fuel:Pharo12/repository'; + baseline: 'Fuel'; + load. +``` + ## Pharo >= 7.0 ```smalltalk Metacello new - repository: 'github://theseion/Fuel:5.1.0/repository'; + repository: 'github://theseion/Fuel:5.2.2/repository'; baseline: 'Fuel'; load. ``` @@ -109,7 +117,7 @@ Gofer new ## Squeak >= 5.2 ```smalltalk Metacello new - repository: 'github://theseion/Fuel:5.1.0/repository'; + repository: 'github://theseion/Fuel:5.2.2/repository'; baseline: 'Fuel'; load. ``` diff --git a/docs/builtin-header-support.md b/docs/builtin-header-support.md index de0ce3d1..7bbfa054 100644 --- a/docs/builtin-header-support.md +++ b/docs/builtin-header-support.md @@ -1,3 +1,13 @@ ++++ ++++ +
+ IMPORTANT +

+ The information on this page refers to versions < 5. +

+
+ +# Built-in Header Support Since the graph of objects serialized in a file can be large, and it can be useful to query some small extra info, Fuel supports the possibility to easily add such information in a header. The following examples show this set of features: ```smalltalk | serializer | diff --git a/docs/customizing-the-graph.md b/docs/customizing-the-graph.md index 2da3cfb8..9508626c 100644 --- a/docs/customizing-the-graph.md +++ b/docs/customizing-the-graph.md @@ -1,4 +1,15 @@ -# Ignoring Instance Variables ++++ ++++ +
+ IMPORTANT +

+ The information on this page refers to versions < 5. While the core concepts have not changed, some information may be outdated. +

+
+ +# Customizing The Graph + +## Ignoring Instance Variables It can happen that instance variables should never be serialized. A practical way to do this is overriding the hook method #fuelIgnoredInstanceVariableNames. Let's say we have the class User and we do not want to serialize the instance variables 'acumulatedLogins' and 'applications'. So we implement: ```smalltalk User class >> fuelIgnoredInstanceVariableNames @@ -11,9 +22,9 @@ The method `#fuelAfterMaterialization` lets us execute something once an object User >> fuelAfterMaterialization acumulatedLogins := 0. ``` -# Substitution on Serialization +## Substitution on Serialization Sometimes you may want to serialize something different than the original object, without altering them. -## Dynamic way +### Dynamic way You can establish a pluggable substitution to a particular serialization. Let's illustrate with an example, where your graph includes a Stream and you want to serialize nil instead. ```smalltalk objectToSerialize := Array with: 'hello' with: '' writeStream. @@ -28,7 +39,8 @@ FileStream forceNewFileNamed: 'demo.fuel' do: [ :aStream | on: aStream binary ]. ``` So, when loading you will get `#('hello' nil)`, without any instance of a stream.You can find this code in `FLUserGuidesTest>>testPluggableSubstitution`. -## Static way + +### Static way You have to override `#fuelAccept:` in the class of the object to be substituted. Fuel visits each object in the graph by sending this message, to determine how to trace and serialize it. Note that this will affect every serialization, in contrast with the 'dynamic way' we explained above; but it could be much faster.As an example, imagine we want to replace an object directly with nil. In other words, we want to make a whole object transient, say CachedResult. For that, we should implement: ```smalltalk CachedResult >> fuelAccept: aGeneralMapper @@ -58,8 +70,9 @@ User >> fuelAccept: aGeneralMapper onRecursionDo: [ super fuelAccept: aGeneralMapper ] ``` In the case, the substitute user (i.e. the one with the empty history) is will be visited via its super implementation.You can see tests for this functionality at FLHookedSubstitutionTest. -# Substitution on Materialization -## Global Sends + +## Substitution on Materialization +### Global Sends Suppose we have a special instance of User that represents the admin user, and it is an unique instance in the image. In case the admin user is referenced in our graph, we want to treat that object as a global. We can do that in this way: ```smalltalk User >> fuelAccept: aGeneralMapper @@ -72,7 +85,8 @@ User >> fuelAccept: aGeneralMapper ifFalse: [ super fuelAccept: aGeneralMapper ] ``` So what will happen is that during serialization, the admin user won't be completly serialized (with all its intance variables) but instead its global name and selector are stored. Then, at materialization time, Fuel will send #admin to the class User, and use what that answers as the admin user of the materialized graph. We test this feature in FLGlobalSendSerializationTest. -## Hooking instance creation + +### Hooking instance creation Fuel provides two hook methods to customise how instances are created: `#fuelNew` and `#fuelNew:`. For (regular) fixed objects, the method `#fuelNew` is defined in Behavior as: ```smalltalk fuelNew @@ -84,7 +98,8 @@ fuelNew ^ self uniqueInstance ``` This similarly applies to variable objects through the method `#fuelNew:`, which by default answers `#basicNew:`. We test this feature in FLSingletonTest. -## Not Serializable Objects + +### Not Serializable Objects You may want to be sure that some objects are not serialized. For this case we provide `#visitNotSerializable:`, which in next example forbids serialization of any instance of MyNotSerializableObject. ```smalltalk MyNotSerializableObject >> fuelAccept: aGeneralMapper diff --git a/docs/debugging.md b/docs/debugging.md index 6f0ab28a..099e3df9 100644 --- a/docs/debugging.md +++ b/docs/debugging.md @@ -1,25 +1,35 @@ ++++ ++++ +
+ IMPORTANT +

+ The debugging packages are no longer being maintained. The documentation below was written for version 1.8.1 but is left here for posterity. +

+
+ +# Debugging There are a couple of packages that help us debugging Fuel. To understand the output of the tools in this guide, you should know some basics of how Fuel internally works. -# Serialization +## Serialization The most important thing to remark is that serialization is split in two main steps: analysis and encoding. -## Analysis +### Analysis It consists in a graph iteration, mapping each traversed object to its correspondent grouping, called cluster. -## Encoding +### Encoding After analysis, we linearly write on the stream, in these steps: 1. header 1. for each cluster, instances part 1. for each cluster, references part 1. trailer -# Materialization +## Materialization It consists on progressively recreating the graph. -## Decoding +### Decoding This is done by linearly reading from the stream. So, steps are obviously analogous to the ones above: 1. header 1. for each cluster, instances part 1. for each cluster, references part 1. trailer -# Debug Tools +## Debugging Tools Ensure you have them with: ```smalltalk (ConfigurationOfFuel project version: '1.8.1') @@ -42,7 +52,7 @@ I add draw capabilities to analysis in FuelDebug package.Right-click a node for ``` They look like: {{< figure src="/static/fuel-preview.png" title="Fuel Preview" >}} -## FLDebugSerialization +### FLDebugSerialization I am a serialization which facilitates debugging, by logging the stream position before and after main steps of `FLSerialization`, including cluster information. Obviously, you should be familiar with such class and the algorithm to understand the output log.To use, send #setDebug to your serializer and run as usually. For example: ```smalltalk FileStream forceNewFileNamed: 'debug.fuel' do: [:aFile | @@ -55,7 +65,7 @@ Then, inspect the output log: FLDebugSerialization last log ``` -## FLDebugMaterialization +### FLDebugMaterialization I am a materialization which facilitates debugging, by logging the stream position before and after main steps of `FLMaterialization`, including cluster information. Obviously, you should be familiar with such class and the algorithm to understand the output log.To use, send `#setDebug` to your serializer and run as usually. For example: ```smalltalk FileStream oldFileNamed: 'debug.fuel' do: [:aFile | diff --git a/docs/errors.md b/docs/errors.md index ff6e6ee5..5f8f6a51 100644 --- a/docs/errors.md +++ b/docs/errors.md @@ -1,3 +1,4 @@ +# Errors We provide a hierarchy of errors which allow to clearly identify the problem if something went wrong: - FLError - FLSerializationError diff --git a/docs/format-migration.md b/docs/format-migration.md deleted file mode 100644 index 2e2d19eb..00000000 --- a/docs/format-migration.md +++ /dev/null @@ -1,29 +0,0 @@ -Until now, each Fuel version has its own stream format. Furthermore, each version is not compatible with the others. This means that when upgrading Fuel version, we will need to convert our serialized streams. We include below an example of migration. Let's say we have some files serialized with Fuel 1.7 in a Pharo 1.4 image and we want to migrate them to Fuel 1.9. -```smalltalk - | oldVersion newVersion fileNames objectsByFileName - materializerClass serializerClass | - oldVersion := '1.7'. - newVersion := '1.9'. - fileNames := #('a.fuel' 'b.fuel' 'c.fuel' 'd.fuel' 'e.fuel'). - objectsByFileName := Dictionary new. - - - (ConfigurationOfFuel project version: oldVersion) load. - materializerClass := Smalltalk at: #FLMaterializer. - - fileNames do: [ :fileName | - objectsByFileName - at: fileName - put: (materializerClass materializeFromFileNamed: fileName) ]. - - - (ConfigurationOfFuel project version: newVersion) load. - serializerClass := Smalltalk at: #FLSerializer. - - objectsByFileName keysAndValuesDo: [ :fileName :objects | - serializerClass - serialize: objects - toFileNamed: 'migrated-', fileName - ]. -``` -**Note 1:** We assume in this example that the number of objects to migrate can be materialized all together at the same time. This can be false. In such case, we could fix the script to split the list of files and do it in parts.Note 2: It is necessary to fetch the classes in the System Dictionary after the desired Fuel version has been loaded.Note 3: This script should be evaluated in the original image. For example, we don't guarantee that Fuel 1.7 loads in Pharo 2.0, but we know that Fuel 1.9 loads in Pharo 1.4. \ No newline at end of file diff --git a/docs/managing-globals.md b/docs/managing-globals.md index 94e3a9ca..77394aa7 100644 --- a/docs/managing-globals.md +++ b/docs/managing-globals.md @@ -1,8 +1,15 @@ +++ -type = "docs" +++ +
+ IMPORTANT +

+ The information on this page refers to versions < 5. +

+
+ +# Managing Globals Let us assume a CompiledMethod is referenced from the graph to serialize. Sometimes we may be interested in storing just the selector and name of the class, because we know it will be present when materializing the graph. However, sometimes we want to really store the method with full detail.This means that given an object graph, there is not an unique way of serializing it. Fuel offers dynamic and static mechanisms to customize this. -## Default globals +## Default Globals By default, Fuel considers following objects as globals, i.e. will store just its name: - `nil`, `true`, `false`, and `Smalltalk globals`. - Any `Class`, `Trait`, `Metaclass` or `ClassTrait`. diff --git a/docs/migration.md b/docs/migration.md index 05a89a68..c96f6947 100644 --- a/docs/migration.md +++ b/docs/migration.md @@ -1,15 +1,27 @@ -Often, we need to load objects whose class has changed since it was saved. In this document how to load them in the different cases. The figure below is useful to explain some of them. Imagine we serialized an instance of Point and we need to materialize it when Point class has changed. -# ShapeChanges -Let's start with the easier cases. If a variable was inserted, its value will be nil. If removed, it is also obvious: the serialized value will be ignored. In the case the variables are the same the the order changed, Fuel also tolerates it automatically.A more interesting case is when a variable was renamed, where the user can map old names to new ones. In our example: +# Migration +Often, we need to load objects whose class has changed since it was saved. This page documents how to load them in the different cases. Imagine we serialized an instance of `Point` and we need to materialize it when `Point` class has changed. + +## Shape Changes +Let's start with the easier cases. If a variable was inserted, its value will be `nil`, as no value for this variable exists in the serialized state. If a variable is removed, it is also obvious: the serialized value will be ignored. In the case where variables retained their names but changed order, Fuel also handles this automatically. + +A more interesting case is when variables were renamed, where the user can map old names to new ones. For example, to map the values of the old variable names `x` and `y` to `posX` and `posY`, respectively, we would write: ```smalltalk -FLMaterializer newDefault +FLMaterializer new migrateClassNamed: #Point variables: {'x' -> 'posX'. 'y' -> 'posY'}. ``` -Not surprisingly, if nothing specified the change will be understood by Fuel as two independent operations, an insertion and a removal.The last change in the figure is a class rename. This should be specified this way: + +Not surprisingly, if variables were renamed and no migration operation was specified, the change will be understood by Fuel as two independent operations, a removal (old variable names no longer exist), and an insertion (two new variables, both with values `nil`). + +Class renaming operations should be specified this way: ```smalltalk -FLMaterializer newDefault +FLMaterializer new migrateClassNamed: #Point toClass: Coordinate. ``` -It is also available `#migrateClassNamed:toClass:variables:` to combine both class and variable rename.Although not illustrated in the figure, a class could also change its layout. For example, Point could change from being fixed to variable. This should be also automatically tolerated by Fuel. Unfortunately, the inverse (variable to fixed) is not supported so far.You can find tests related to this guide in `FLMigrationTest`. Additionally, the method globalEnvironment:, showed in Managing Globals, might be useful for migrations: you can prepare an ad-hoc environment dictionary with the same keys that were used during serialization, but with the new classes as values. \ No newline at end of file + +In addition to the methods mentioned above, the method `FLMaterializer>>#migrateClassNamed:toClass:variables:` can be used to combine both class and variable renaming operations. + +Lastly, it is possible for clases to undergo layout changes. For example, `Point` could change from being fixed to variable. This specific case is also automatically handled by Fuel. Unfortunately, the inverse (variable to fixed) is not supported. + +You can find tests related to this guide in `FLMigrationTest`. Additionally, the method `#FLMaterializer>>#environment:` can be useful for migrations: you can prepare an ad-hoc environment dictionary with the same keys that were used during serialization, but with the new classes as values. \ No newline at end of file diff --git a/docs/package-overview.md b/docs/package-overview.md index 8c6d6875..2abf23f0 100644 --- a/docs/package-overview.md +++ b/docs/package-overview.md @@ -1,3 +1,13 @@ ++++ ++++ +
+ IMPORTANT +

+ The information on this page refers to versions < 5. +

+
+ +# Package Overview Fuel is a general purpose serializer and it is highly customizable to cope with different objects and scenarios. Below we describe the main packages that are available in our repository. For simplicitly we omit testing packages. ## Fuel diff --git a/docs/releases/5.2.1.md b/docs/releases/5.2.1.md new file mode 100644 index 00000000..386e4d60 --- /dev/null +++ b/docs/releases/5.2.1.md @@ -0,0 +1,9 @@ ++++ +weight = -190 ++++ + +# Version 5.2.1 +15 May 2023 + +## Announcement +This release only adds a convenience accessor method. diff --git a/docs/releases/5.2.2.md b/docs/releases/5.2.2.md new file mode 100644 index 00000000..2e4f338e --- /dev/null +++ b/docs/releases/5.2.2.md @@ -0,0 +1,10 @@ ++++ +weight = -200 ++++ + +# Version 5.2.2 +01 July 2023 + +## Announcement +`WeakFinalizationList` was removed in Pharo 11, which caused a test to fail. +The test was deleted and added as an extension to all other platforms. diff --git a/docs/upgrading.md b/docs/upgrading.md new file mode 100644 index 00000000..f1c63612 --- /dev/null +++ b/docs/upgrading.md @@ -0,0 +1,41 @@ +# Upgrading Fuel +Each Fuel version has its own stream format. Furthermore, each version is considered incompatible with other versions. In Fuel 5 this requirement was changed, such that all versions with the same major version are considered compatible. + +This means, in general, that when upgrading Fuel, we will need to convert our serialized streams. + +**Notes** +1. We assume in these examples that the number of objects to migrate can be materialized all at the same time, which might not be possible in practice. In such a case, the script could split the list of files and perform the migration in batches. +2. It is necessary to fetch the materializer class dynamically after the desired Fuel version has been loaded. The binding of a static class reference might be stale and point to an old version of the class instead of the newly installed one. +3. This script should be evaluated in the original image, as versions are usually backwards-compatible, but not vice-versa. + +Let's say, we have some files serialized with Fuel 3.0.0 and we want to migrate them to Fuel 3.0.3. The following example works in Pharo 8: +```smalltalk +| oldVersion newVersion fileNames objectsByFileName materializerClass serializerClass | +oldVersion := '3.0.0'. +newVersion := '3.0.3'. +fileNames := #('a.fuel' 'b.fuel' 'c.fuel' 'd.fuel' 'e.fuel'). +objectsByFileName := Dictionary new. + +materializerClass := Smalltalk at: #FLMaterializer. +fileNames do: [ :fileName | + objectsByFileName + at: fileName + put: (materializerClass materializeFromFileNamed: fileName) ]. + +Metacello new + repository: 'github://theseion/Fuel:3.0.3/repository'; + baseline: 'Fuel'; + onConflictUseIncoming; + load. + +serializerClass := Smalltalk at: #FLSerializer. + +objectsByFileName keysAndValuesDo: [ :fileName :objects | + serializerClass + serialize: objects + toFileNamed: 'migrated-', fileName + ]. +``` + +## Considerations +We know that it is possible to upgrade from Fuel 3.0.3 to Fuel 5.2.2 directly, using the method detailed above. However, due to the nature of Fuel and changes to the internal objects across different versions of Fuel and Squeak, we cannot guarantee that this will work for everyone. For example, Fuel version 5 has no concept of `BlockContext`, because it was renamed to `Context` in later versions. Hence, Fuel 5 in Pharo 8 will not be able to serialize `BlockContext`. \ No newline at end of file diff --git a/hugo/config.toml b/hugo/hugo.toml similarity index 95% rename from hugo/config.toml rename to hugo/hugo.toml index c894be79..ca4a8b36 100644 --- a/hugo/config.toml +++ b/hugo/hugo.toml @@ -12,7 +12,7 @@ enableGitInfo = true # (Optional) Theme is intended for documentation use, therefore it doesn't render taxonomy. # You can remove related files with config below -disableKinds = ['taxonomy', 'taxonomyTerm'] +disableKinds = ['taxonomy'] [params] # (Optional, default light) Sets color theme: light, dark or auto. @@ -62,3 +62,8 @@ disableKinds = ['taxonomy', 'taxonomyTerm'] # Portable links meant to work with text editors and let you write markdown without {{< relref >}} shortcode # Theme will print warning if page referenced in markdown does not exists. BookPortableLinks = true + + [markup] + [markup.goldmark] + [markup.goldmark.renderer] + unsafe = true \ No newline at end of file diff --git a/repository/Fuel-Core.package/CompiledCode.extension/instance/literalsHash.st b/repository/Fuel-Core.package/CompiledCode.extension/instance/literalsHash.st new file mode 100644 index 00000000..77ab5108 --- /dev/null +++ b/repository/Fuel-Core.package/CompiledCode.extension/instance/literalsHash.st @@ -0,0 +1,13 @@ +*Fuel-Core +literalsHash + "Answer a 16-bit checksum of the hashes of the literals." + + ^ CRC crc16FromCollection: (ByteArray + new: self numLiterals + streamContents: [ :stream | + self literalsDo: [ :literal | + | hash | + hash := literal hash. + 1 + to: hash bytesCount + do: [ :byteIndex | stream nextPut: (hash byteAt: byteIndex) ] ] ]) \ No newline at end of file diff --git a/repository/Fuel-Core.package/FLCompiledBlockCluster.class/instance/shouldWarnThatMethodChangedFor..st b/repository/Fuel-Core.package/FLCompiledBlockCluster.class/instance/shouldWarnThatMethodChangedFor..st index ba8a7a65..5a90c3e1 100644 --- a/repository/Fuel-Core.package/FLCompiledBlockCluster.class/instance/shouldWarnThatMethodChangedFor..st +++ b/repository/Fuel-Core.package/FLCompiledBlockCluster.class/instance/shouldWarnThatMethodChangedFor..st @@ -6,4 +6,4 @@ shouldWarnThatMethodChangedFor: aBlock currentMethod := method methodClass compiledMethodAt: method selector. ^ currentMethod bytecodesHash ~= method bytecodesHash or: [ - currentMethod literals ~= method literals ] \ No newline at end of file + currentMethod literalsHash ~= method literalsHash ] \ No newline at end of file diff --git a/repository/Fuel-Core.package/FLHeader.class/instance/additionalObjects.st b/repository/Fuel-Core.package/FLHeader.class/instance/additionalObjects.st new file mode 100644 index 00000000..5cad48f7 --- /dev/null +++ b/repository/Fuel-Core.package/FLHeader.class/instance/additionalObjects.st @@ -0,0 +1,3 @@ +private +additionalObjects + ^ additionalObjects diff --git a/repository/Fuel-Core.package/FLVersion.class/class/current.st b/repository/Fuel-Core.package/FLVersion.class/class/current.st index 020a1372..edf2fd12 100644 --- a/repository/Fuel-Core.package/FLVersion.class/class/current.st +++ b/repository/Fuel-Core.package/FLVersion.class/class/current.st @@ -1,7 +1,6 @@ accessing current - ^ Current ifNil: [ - Current := self - newWithMajor: 5 - minor: 2 - patch: 0 ] \ No newline at end of file + ^ self + newWithMajor: 5 + minor: 2 + patch: 1 diff --git a/repository/Fuel-Tests-Core.package/FLWeakObjectsTest.class/instance/testAssociationWithWeakFinalizationList.st b/repository/Fuel-Tests-Core.package/FLWeakObjectsTest.class/instance/testAssociationWithWeakFinalizationList.st deleted file mode 100644 index 3d3d8232..00000000 --- a/repository/Fuel-Tests-Core.package/FLWeakObjectsTest.class/instance/testAssociationWithWeakFinalizationList.st +++ /dev/null @@ -1,16 +0,0 @@ -tests -testAssociationWithWeakFinalizationList - "This tests an association with WeakFInalizationList as its value." - - | weak association materializedAssociation object list | - object := Object new. - list := WeakFinalizationList new. - weak := WeakFinalizerItem new list: list object: object executor: nil. - association := Association key: #foo value: weak. - - materializedAssociation := self resultOfSerializeAndMaterialize: association. - "Both, 'executor' and 'list' are fixed instance variables, hence they are strong and hence should not be replaced by nil. Instead, 'object' is stored in the variable part of WeakFinalizationItem, so it is weak and so it should have been replaced by nil." - self assert: materializedAssociation value executor isNil. - self assert: materializedAssociation value list isNil not. - self assert: materializedAssociation value object isNil. - self assert: materializedAssociation key equals: #foo \ No newline at end of file