From 90698ce15847bab64aa26f316f2e26e59fb56d8b Mon Sep 17 00:00:00 2001 From: Narongrit Unwerawattana Date: Tue, 1 Oct 2024 11:01:17 +0200 Subject: [PATCH] fix import target --- .mega-linter.yml | 2 +- .pre-commit-config.yaml | 6 ------ .../architectural-composition/embedding/README.md | 4 ++-- src/tutorials/getting-started/README.md | 10 +++++----- src/tutorials/using-dependencies/README.md | 4 ++-- .../https/README.md | 4 ++-- .../soaps/README.md | 4 ++-- .../sodep/README.md | 4 ++-- .../sodeps/README.md | 4 ++-- src/tutorials/using-more-than-one-dependency/README.md | 4 ++-- 10 files changed, 20 insertions(+), 26 deletions(-) diff --git a/.mega-linter.yml b/.mega-linter.yml index 7d78261e..f1a30d6b 100644 --- a/.mega-linter.yml +++ b/.mega-linter.yml @@ -8,7 +8,7 @@ DISABLE: - CSS - DOCKERFILE - REPOSITORY - # - SPELL # Uncomment to disable checks of spelling mistakes + - SPELL # Uncomment to disable checks of spelling mistakes SHOW_ELAPSED_TIME: true FILEIO_REPORTER: false # DISABLE_ERRORS: true # Uncomment if you want MegaLinter to detect errors but not block CI to pass diff --git a/.pre-commit-config.yaml b/.pre-commit-config.yaml index 48cf28fc..93d25782 100644 --- a/.pre-commit-config.yaml +++ b/.pre-commit-config.yaml @@ -8,10 +8,4 @@ repos: - id: megalinter-incremental # Faster, less thorough stages: - commit - args: - - mega-linter-runner - - --containername=megalinter-incremental - - --flavor=documentation - - --remove-container - - --fix # npx mega-linter-runner -e 'ENABLE=MARKDOWN,YAML' -e 'SHOW_ELAPSED_TIME=true' -e "'APPLY_FIXES=all'" -e "'CLEAR_REPORT_FOLDER=true'" -e "'LOG_LEVEL=warning'" --containername megalinter-incremental --remove-container --fix --filesonly diff --git a/src/language-tools-and-standard-library/architectural-composition/embedding/README.md b/src/language-tools-and-standard-library/architectural-composition/embedding/README.md index 7a0879d3..c31f3792 100644 --- a/src/language-tools-and-standard-library/architectural-composition/embedding/README.md +++ b/src/language-tools-and-standard-library/architectural-composition/embedding/README.md @@ -144,8 +144,8 @@ As an example let us consider the case of a calculator which offers the four ari ```jolie from runtime import Runtime -from OperationInterface import OperationInterface -from CalculatorInterface import CalculatorInterface +from .OperationInterface import OperationInterface +from .CalculatorInterface import CalculatorInterface service Calculator { diff --git a/src/tutorials/getting-started/README.md b/src/tutorials/getting-started/README.md index c8ea6913..587bf027 100644 --- a/src/tutorials/getting-started/README.md +++ b/src/tutorials/getting-started/README.md @@ -73,21 +73,21 @@ Some interesting things to note: Once we have defined the interface to implement, we are ready to define the service. Let's call the service `CalculatorService`. Edit a new module as follows: ```jolie -from CalculatorInterfaceModule import CalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface service CalculatorService { } ``` -This code permits to import the definition of the `CalculatorInterface` from module `CalculatorInterfaceModule` stored into file `CalculatorInterfaceModule.ol` and defines a service called `CalculatorService`. +This code permits to import the definition of the `CalculatorInterface` from module `CalculatorInterfaceModule` stored into file `CalculatorInterfaceModule.ol` and defines a service called `CalculatorService`. The dot prefix tells Jolie that it should find the module in the same directory. ### Defining the inputPort Unfortunately, the code above will raise an error if executed, because the service definition does not contain any listening port nor any behaviour too. Let's start by defining a listening endpoint for this service: ```jolie -rom CalculatorInterfaceModule import CalculatorInterface +rom .CalculatorInterfaceModule import CalculatorInterface service CalculatorService { @@ -110,7 +110,7 @@ Listening endpoints in Jolie are called `inputPort`. In this example we defined Now, the service is ready to receive messages on the operation specified in interface `CalculatorInterface` but we did not tell it what to do once a message is received. It is time to finalize the service by specifying the behaviour: ```jolie -from CalculatorInterfaceModule import CalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface service CalculatorService { @@ -205,7 +205,7 @@ In order to enable the service to continuously serve requests we need to specify So, let's admire our first service in Jolie! ```jolie -from CalculatorInterfaceModule import CalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface service CalculatorService { diff --git a/src/tutorials/using-dependencies/README.md b/src/tutorials/using-dependencies/README.md index 7a5e007f..3a64268f 100644 --- a/src/tutorials/using-dependencies/README.md +++ b/src/tutorials/using-dependencies/README.md @@ -50,8 +50,8 @@ The service offers three operations: `factorial`, `average` and `percentage` who In the following we report the actual definition of the `AdvancedCalculatorService`: ```jolie -from AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface -from CalculatorInterfaceModule import CalculatorInterface +from .AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface service AdvancedCalculatorService { diff --git a/src/tutorials/using-more-input-ports-and-protocols/https/README.md b/src/tutorials/using-more-input-ports-and-protocols/https/README.md index 6cea80eb..681e4bf7 100644 --- a/src/tutorials/using-more-input-ports-and-protocols/https/README.md +++ b/src/tutorials/using-more-input-ports-and-protocols/https/README.md @@ -34,8 +34,8 @@ The complete example follows and it may be consulted at this [link] () ```jolie -from AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface -from CalculatorInterfaceModule import CalculatorInterface +from .AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface interface ChuckNorrisIface { RequestResponse: random( undefined )( undefined ) diff --git a/src/tutorials/using-more-input-ports-and-protocols/soaps/README.md b/src/tutorials/using-more-input-ports-and-protocols/soaps/README.md index 15dff37d..7365e4ce 100644 --- a/src/tutorials/using-more-input-ports-and-protocols/soaps/README.md +++ b/src/tutorials/using-more-input-ports-and-protocols/soaps/README.md @@ -41,8 +41,8 @@ The complete example follows and it may be consulted at this [link] () ```jolie -from AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface -from CalculatorInterfaceModule import CalculatorInterface +from .AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface interface ChuckNorrisIface { RequestResponse: random( undefined )( undefined ) diff --git a/src/tutorials/using-more-input-ports-and-protocols/sodep/README.md b/src/tutorials/using-more-input-ports-and-protocols/sodep/README.md index 04dfc8f4..c8014076 100644 --- a/src/tutorials/using-more-input-ports-and-protocols/sodep/README.md +++ b/src/tutorials/using-more-input-ports-and-protocols/sodep/README.md @@ -29,8 +29,8 @@ The complete example follows and it may be consulted at this [link] () ```jolie -from AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface -from CalculatorInterfaceModule import CalculatorInterface +from .AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface interface ChuckNorrisIface { RequestResponse: random( undefined )( undefined ) diff --git a/src/tutorials/using-more-input-ports-and-protocols/sodeps/README.md b/src/tutorials/using-more-input-ports-and-protocols/sodeps/README.md index 58dc90ff..de327c98 100644 --- a/src/tutorials/using-more-input-ports-and-protocols/sodeps/README.md +++ b/src/tutorials/using-more-input-ports-and-protocols/sodeps/README.md @@ -31,8 +31,8 @@ The complete example follows and it may be consulted at this [link] () ```jolie -from AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface -from CalculatorInterfaceModule import CalculatorInterface +from .AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface interface ChuckNorrisIface { RequestResponse: random( undefined )( undefined ) diff --git a/src/tutorials/using-more-than-one-dependency/README.md b/src/tutorials/using-more-than-one-dependency/README.md index 3b09a59e..90ffece1 100644 --- a/src/tutorials/using-more-than-one-dependency/README.md +++ b/src/tutorials/using-more-than-one-dependency/README.md @@ -53,8 +53,8 @@ It is worth noting that all the response messages, now contain a new field calle In the following we report the definition of the `AdvancedCalculatorService`. ```jolie -from AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface -from CalculatorInterfaceModule import CalculatorInterface +from .AdvancedCalculatorServiceInterfaceModule import AdvancedCalculatorInterface +from .CalculatorInterfaceModule import CalculatorInterface interface ChuckNorrisIface { RequestResponse: random( undefined )( undefined )