Find

InterSystems Official
· Dec 17, 2024

Publication de l'IPM 0.9.0

Nous avons publié IPM 0.9.0. J'ai déjà évoqué une partie de l'historique et du raisonnement ici ; pour résumer, il s'agit d'une version importante pour deux raisons : elle représente une réunification attendue depuis longtemps de notre travail interne et communautaire autour de la gestion des paquets ObjectScript centrée sur IRIS, et elle présente certaines incompatibilités rétroactives. Il existe plusieurs incompatibilités rétroactives nécessaires dans notre feuille de route, et nous les avons regroupées ; ce ne sera pas une nouvelle norme.

Sous le capot, la dénomination des classes et la structure des paquets ont complètement changé. Si vous utilisez directement des appels à (très probablement) %ZPM.PackageManager, la classe équivalente est désormais %IPM.Main. Pour les projets communautaires concernés par ce changement de nom, nous avons soumis un tas de demandes de participation pour mettre les choses à jour, et une certaine utilisation des anciens noms de classe %ZPM.* est migrée automatiquement lors de l'installation via ZPM pour permettre aux paquets de fonctionner avec les anciennes et les nouvelles versions d'IPM.

Si vous effectuez une mise à jour d'IPM 0.7.x vers 0.9.0, tout devrait « fonctionner » comme avant : il est disponible à l'échelle de l'instance, avec les données migrées vers de nouveaux emplacements de stockage.

Sur une nouvelle installation, les choses sont un peu différentes ; par défaut, le registre de communauté n'est pas activé et IPM n'est disponible que dans l'espace de noms dans lequel il a été installé. Pour obtenir un comportement équivalent à 0.7.x sur une nouvelle installation, vous devez exécuter les commandes suivantes pour mapper IPM partout et utiliser le registre de communauté par défaut, respectivement :

zpm "enable -map -globally"
zpm "repo -reset-defaults"

Un patch 0.9.1 sera bientôt disponible (aujourd'hui/demain, assez tôt pour que je me contente de mettre à jour ce message) et simplifiera ce processus dans une certaine mesure ; consultez https://github.com/intersystems/ipm/issues/662 pour le contexte/les mises à jour.

Si vous rencontrez des problèmes ou des questions, veuillez déposer un problème sur GitHub ; nous garderons également un œil sur la communauté des développeurs.

Discussion (0)1
Log in or sign up to continue
Article
· Dec 17, 2024 2m read

Editad vuestros Globals con VSCode y YAML

La mejor manera de listar, editar, guardar y eliminar globals es utilizando un IDE. Ahora es posible si usáis VSCode. También es posible guardar globals utilizando archivos YAML. Para ello deberéis seguir los siguientes pasos:

  1. Obtened una instancia de InterSystems IRIS e instalad la aplicación iris-global-yaml:
zpm:USER>install iris-global-yaml
  1. Si solo queréis probarlo en InterSystems IRIS, clonad el repositorio con git y ejecutadlo en Docker:
git clone https://github.com/yurimarx/iris-global-yaml.git
docker-compose up -d --build
  1. Id a https://openexchange.intersystems.com/package/IRIS-Global-VSCode-Editor, haced clic en el botón de GitHub, buscad el archivo iris-global-editor-0.0.1.vsix y guardadlo en vuestro disco local.
  2. Ahora, abrid vuestro IDE de VSCode y haced clic en extensiones:

 

  1. Haced clic en el botón ... y seleccionad Install from VSIX...:

 

  1. Seleccionad el archivo VSIX desde vuestro disco local para instalarlo (si la instalación falla, actualizad vuestro VSCode a la versión más reciente y volved a intentarlo):

  1. Id a View > Explorer:

  1. Cread o editad el archivo .vscode/settings.json con la configuración de conexiones (editadlo con vuestro host, puerto, namespace y credenciales):
"conf.irisGlobalEditor.serverconfig": { 
      "host": "http://localhost:52773", 
      "namespace": "USER", 
      "username": "_SYSTEM", 
      "password": "SYS"
}
  1. Id a la pestaña INTERSYSTEMS IRIS GLOBALS y haced clic en el botón refresh:

  1. VSCode listará todos los globals en el namespace configurado:

  1. En la parte superior de la pestaña, haced clic en el botón de más (+) para crear un nuevo global:

  1. Escribid el nombre del global y su valor, y pulsad enter:

  1. Haced clic en el botón de refrescar nuevamente y veréis vuestro nuevo global al final:

  1. Ahora, haced clic en el botón del editor (el último botón) para crear un archivo YAML y editar vuestro global:

  1. Se creará un nuevo archivo YAML con el contenido del global:

  1. Editad el archivo YAML para insertar subíndices en vuestro global (es muy importante usar la indentación con 4 espacios):
# IRIS-Global-YAML
USER:
 ^test:
     value: InterSystems IRIS
     subscripts:
        - ^test(1): 1
        - ^test(1,1): 1.1
        - ^test(1,2): 1.2
        - ^test(2,1): 2.1
        - ^test(2,2): 2.2
        - ^test(2,3): 2.3
        - ^test(2,4): 2.4
  1. Guardad el archivo en cualquier carpeta del proyecto y el contenido del global se guardará en el servidor IRIS:

  1. También podéis probar el botón de eliminar. ¡A divertirse!
Discussion (0)0
Log in or sign up to continue
Question
· Dec 17, 2024

UDP Adapter not working

Hello

I am trying to work with UDP Connection/Adapter and I get this error.

ERREUR #5002: Erreur Cache: <WRITE>zSend+5^EnsLib.UDP.Common.1

 Here is the method
 

Class TEMPLATE.BO.UDPSend Extends Ens.BusinessOperation
{

Parameter ADAPTER = "EnsLib.UDP.OutboundAdapter";

Property Adapter As EnsLib.UDP.OutboundAdapter;

Method SendData(pInput As Ens.Request, Output pOutput As Ens.Response) As %Status
{
    Try {
        Set status=$$$OK
        Set pOutput=##class(Ens.Response).%New()
        
        Set stream = ##class(%Stream.GlobalCharacter).%New()
        Do stream.Write("This is some text")
        $$$LOGINFO(stream.Read())
        Do stream.Rewind()

        Set status = ..Adapter.SendStream(stream)
    }
    Catch exception {
        Set status=exception.AsStatus()
    }    
    Return status
}

XData MessageMap
{
<MapItems>
<MapItem MessageType="Ens.Request">
<Method>SendData</Method>
</MapItem>
</MapItems>
}

}

I have tried with ##class(%Net.UDP).%New() and it is working.

Does anyone have an idea of why it is not working or some example of a functionnal method, please ?

Thanks in advance

Corentin

PS : For those who don't want explore the code to find the line where it generate an error : 

zSend(pDevice="",pBuffer) public { Set:'($data(pBuffer)#2) pBuffer=""
    Set tStatus = 1
    Try {
        Do pBuffer.Rewind()
        Use pDevice Do pBuffer.OutputToDevice()
        Use pDevice Write !
    }
    Catch eSend {
        Set tStatus = eSend.AsStatus()
    }
    Quit tStatus }
2 Comments
Discussion (2)0
Log in or sign up to continue
InterSystems Official
· Dec 17, 2024

IPM 0.9.0 Released

We have released IPM 0.9.0. I previously remarked on some of the history and reasoning here; to summarize, this is a big release for two reasons: it represents a long-overdue reunification of our internal and community-driven work around IRIS-centric ObjectScript package management, and it has some backwards incompatibilities. There are several necessary backwards incompatibilities in our roadmap, and we've lumped them together; this will not be some new norm.

Under the hood, the class naming and package structure has completely changed. If you're making direct use of calls to (most likely) %ZPM.PackageManager, the equivalent class is now %IPM.Main. For community projects that are impacted by this name change, we've submitted a bunch of PRs to get things up to date, and some use of old %ZPM.* class names is migrated automatically on installation via ZPM to allow packages to work with both old and new versions of IPM.

If you update from IPM 0.7.x to 0.9.0, everything should "just work" as before - it's available instance-wide, with data migrated to new storage locations.

On a new/fresh installation, things are a little different; by default, the community registry is not enabled, and IPM is only available in the namespace in which it was installed. To get to equivalent behavior of 0.7.x on a new installation, you need to run the following commands to map IPM everywhere and use the default community registry, respectively:

zpm "enable -map -globally"
zpm "repo -reset-defaults"

There's a 0.9.1 patch coming *very* soon (today/tomorrow - soon enough that I'll just update this post) which will streamline this process to some extent; see https://github.com/intersystems/ipm/issues/662 for context/updates.

If you encounter any issues or questions, please file a GitHub issue; we'll be keeping an eye out on the Developer Community as well.

3 Comments
Discussion (3)3
Log in or sign up to continue
Announcement
· Dec 17, 2024

VS Code release November 2024 (version 1.96)

Visual Studio Code releases new updates every month with new features and bug fixes, and the November 2024 release is now available. 

This release includes some useful features for teams implementing VS Code, to achieve consistency and compatibility across organizations. If need help migrating from InterSystems Studio to VS Code, or want to advance your knowledge of VS Code, take a look at the training courses George James Software offers > georgejames.com/vscode-training/

Version 1.96 now includes: 

The release also includes contributions from our very own @John Murray through pull requests that address open issues. 

Find out more about these features in the release notes here > https://code.visualstudio.com/updates/v1_96

For those with VS Code, your environment should auto-update. You can manually check for updates by running Help > Check for Updates on Linux and Windows or running Code > Check for Updates on macOS.

1 Comment
Discussion (1)2
Log in or sign up to continue