microsoft / AL-Go

The plug-and-play DevOps solution for Business Central app development on GitHub
MIT License
278 stars 114 forks source link

[Bug]:Dependency Resolution is not working as expected #1152

Open AlexanderRichter opened 1 month ago

AlexanderRichter commented 1 month ago

AL-Go version

5.2

Describe the issue

Al-Go is not able to solve the dependency using Nuget during build process.

Here is the the Log:

Exact match found for AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
- AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
  PackageId: AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
  Get versions using https://nuget.pkg.github.com/TestALGODelivery/download/al-go-4bfc911b-3d4f-4596-9b8d-759f1acfac01/index.json
  1 versions found
  First version is 17.4.22101301
  Last version is 17.4.22101301
  No package found matching version '17.4.22101301.0' for package id AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
  No package found matching package name AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01 Version 17.4.22101301.0

I created and uploaded the Nuget Package manually fo testing purposes.


PS C:\Users\arichter> New-BcNuGetPackage -appfile "C:\Temp\nugettest\Creator_Foundation_17.4.22101301.0.app" -packageId AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01 -packageVersion 17.4.22101301.0
Create NuGet package
AppFile:
C:\Temp\nugettest\Creator_Foundation_17.4.22101301.0.app
NUSPEC file:
<?xml version="1.0" encoding="utf-8"?>
<package xmlns="http://schemas.microsoft.com/packaging/2010/07/nuspec.xsd">
    <metadata>
        <id>AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01</id>
        <version>17.4.22101301.0</version>
        <title>Foundation</title>
        <description>Provides wrapper functions for the UniversalLink ELO OSGI Plugin</description>
        <authors>Creator</authors>
        <dependencies>
            <dependency id="Creator.BaseFoundation.d78da1d4-e45e-479e-9bb3-c368752fb48f" version="17.4.21090102.21090102"/>
            <dependency id="Microsoft.Application.c1335042-3002-4257-bf8a-75c898ccb1b8" version="17.4.0.0" />
            <dependency id="Microsoft.Platform" version="17.0.0.0" />
        </dependencies>
    </metadata>
    <files>
        <file src="Creator_Foundation_17.4.22101301.0.app" target="Creator_Foundation_17.4.221
01301.0.app" />
    </files>
</package>
Successfully created NuGet package (Size: 81Kb)
C:\Users\arichter\AppData\Local\Temp\AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01-17.4.22101301.0.nupkg

PS C:\Users\arichter> Push-BcNuGetPackage -bcNuGetPackage C:\Users\arichter\AppData\Local\Temp\AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01-17.4.22101301.0.nupkg -nuGetServerUrl https://nuget.pkg.github.com/testalgodelivery/index.json -nuGetToken XXXX
Preparing NuGet Package for submission
Submitting NuGet package
Successfully registered nuget package: AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01 (17.4.22101301)

NuGet package successfully submitted

Using BCContailerHelper Find-BCNugetPackage is only successfull when givin exact argument


PS C:\Users\arichter> Find-BcNuGetPackage -packageName AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01 -nuGetServerUrl https://nuget.pkg.github.com/testalgodelivery/index.json -nuGetToken XXX -version 17.4.22101301.0
Search NuGetFeed https://nuget.pkg.github.com/testalgodelivery/index.json
Search package using https://api.github.com/orgs/testalgodelivery/packages?package_type=nuget&per_page=100&page=1
Exact match found for AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
- AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
PackageId: AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
Get versions using https://nuget.pkg.github.com/testalgodelivery/download/al-go-4bfc911b-3d4f-4596-9b8d-759f1acfac01/index.json
1 versions found
First version is 17.4.22101301
Last version is 17.4.22101301
No package found matching version '17.4.22101301.0' for package id AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01

PS C:\Users\arichter> Find-BcNuGetPackage -packageName AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01 -nuGetServerUrl https://nuget.pkg.github.com/testalgodelivery/index.json -nuGetToken XXX -select Exact -version 17.4.22101301.0
Search NuGetFeed https://nuget.pkg.github.com/testalgodelivery/index.json
Search package using https://api.github.com/orgs/testalgodelivery/packages?package_type=nuget&per_page=100&page=1
Exact match found for AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
- AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
PackageId: AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
Get versions using https://nuget.pkg.github.com/testalgodelivery/download/al-go-4bfc911b-3d4f-4596-9b8d-759f1acfac01/index.json
1 versions found
First version is 17.4.22101301
Last version is 17.4.22101301
Exact version matching '17.4.22101301.0' is 17.4.22101301

url                   : https://nuget.pkg.github.com/testalgodelivery/index.json
token                 : XXX
patterns              : {*}
fingerprints          : {}
searchQueryServiceUrl : https://nuget.pkg.github.com/testalgodelivery/query
packagePublishUrl     : https://nuget.pkg.github.com/testalgodelivery
packageBaseAddressUrl : https://nuget.pkg.github.com/testalgodelivery/download

AL-Go-4bfc911b-3d4f-4596-9b8d-759f1acfac01
17.4.22101301

PS C:\Users\arichter> 

Expected behavior

It looks like there is a problem finding the version if the revision is .0

My expectaion is that it will take the revision into account by default when trying to find teh correct version

Steps to reproduce

  1. Create and upload a nuget package with .0 revision
  2. Create a depend app in Al-go
  3. try to run build process

Additional context (logs, screenshots, etc.)

No response

freddydk commented 3 weeks ago

Will include this bug fix when finalizing the NuGet feature (working on that now)

AlexanderRichter commented 2 weeks ago

great, cant wait to have the NuGet Feature up and running :)