Repository: goplus/gop
Pull request #1665 (2024-01-24 16:17:36)

iOverloadType/iSubstType (goplus/gox#350)


Patch:
diff --git a/.github/workflows/release-build.yml b/.github/workflows/release-build.yml
index 2e61bcb0..91acd95c 100644
--- a/.github/workflows/release-build.yml
+++ b/.github/workflows/release-build.yml
@@ -50,13 +50,3 @@ jobs:
       env:
         GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
         WINGET_PKGS_PRIVATE_KEY: ${{ secrets.WINGET_PKGS_PRIVATE_KEY }}
-
-    - name: Upload deb/rpm to Fury.io
-      run: |
-        for file in dist/*.{deb,rpm}
-        do
-          echo "Uploading $file to Fury.io"
-          curl -sS -F package=@$file https://$FURY_TOKEN@push.fury.io/goplus/
-        done
-      env:
-        FURY_TOKEN: ${{ secrets.FURY_TOKEN }}
diff --git a/.goreleaser.yaml b/.goreleaser.yaml
index 36519f89..908dddb4 100644
--- a/.goreleaser.yaml
+++ b/.goreleaser.yaml
@@ -68,25 +68,12 @@ changelog:
       - "^test:"
 
 winget:
-  - name: goplus
+  - name: gop
     homepage: "https://goplus.org/"
     publisher: goplus
     publisher_url: https://github.com/goplus/gop
     publisher_support_url: "https://github.com/goplus/gop/issues/new"
     package_identifier: goplus.gop
-    path: "manifests/g/goplus/gop/{{.Version}}"
-    tags:
-      - golang
-      - go
-      - gop
-      - goplus
-      - programming
-      - language
-      - compiler
-      - interpreter
-      - data science
-      - engineering
-      - education
     short_description: The Go+ Programming Language
     description: |
       The Go+ programming language is designed for engineering, STEM education, and data science.
@@ -116,7 +103,7 @@ winget:
           branch: master
 
 nfpms:
-  - package_name: gop
+  - package_name: goplus-gop
     vendor: goplus
     homepage: https://goplus.org/
     maintainer: Li Jie <cpunion@gmail.com>
@@ -192,7 +179,7 @@ nfpms:
 
 snapcrafts:
   - id: gop
-    name: gop
+    name: goplus
     title: The Go+ Programming Language
     summary: The Go+ Programming Language
     description: |
diff --git a/README.md b/README.md
index f0f460e8..397bc498 100644
--- a/README.md
+++ b/README.md
@@ -47,41 +47,6 @@ For more details, see [Quick Start](doc/docs.md).
 
 ## How to install
 
-### on Windows
-
-```sh
-winget install goplus
-```
-
-Or
-
-```sh
-winget install goplus.gop
-```
-
-### on Debian/Ubuntu
-
-```sh
-sudo bash -c ' echo "deb [trusted=yes] https://pkgs.goplus.org/apt/ /" > /etc/apt/sources.list.d/goplus.list'
-sudo apt update
-sudo apt install gop
-```
-
-### on RedHat/CentOS/Fedora
-
-```sh
-sudo bash -c 'echo -e "[goplus]\nname=Go+ Repo\nbaseurl=https://pkgs.goplus.org/yum/\nenabled=1\ngpgcheck=0" > /etc/yum.repos.d/goplus.repo'
-sudo yum install gop
-```
-
-### on macOS/Linux(Homebrew)
-
-Install via [brew](https://brew.sh/)
-
-```sh
-$ brew install goplus
-```
-
 ### from source code
 
 For now, we suggest you install Go+ from source code.
@@ -98,6 +63,14 @@ cd gop
 all.bat
 ```
 
+### on macOS/Linux
+
+Install via [brew](https://brew.sh/)
+```sh
+$ brew install goplus
+```
+
+
 ## Go+ Applications
 
 ### 2D Games powered by Go+
diff --git a/go.mod b/go.mod
index 287469eb..77c99efa 100644
--- a/go.mod
+++ b/go.mod
@@ -5,7 +5,7 @@ go 1.18
 require (
 	github.com/fsnotify/fsnotify v1.7.0
 	github.com/goplus/c2go v0.7.20-0.20240115161159-762f74054b17
-	github.com/goplus/gox v1.13.1-0.20240124090446-576b08a67368
+	github.com/goplus/gox v1.13.1-0.20240124161318-c8def695918d
 	github.com/goplus/mod v0.12.2-0.20240123033711-abba4c2e8b32
 	github.com/qiniu/x v1.13.2
 	golang.org/x/tools v0.17.0
diff --git a/go.sum b/go.sum
index 3d95753d..df847639 100644
--- a/go.sum
+++ b/go.sum
@@ -7,8 +7,8 @@ github.com/google/gofuzz v1.0.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/
 github.com/goplus/c2go v0.7.20-0.20240115161159-762f74054b17 h1:2+AWW9KjzTwaM8pfvRZqhI3PCXs7cMxzsn98AqDpgH0=
 github.com/goplus/c2go v0.7.20-0.20240115161159-762f74054b17/go.mod h1:WFbERV86IVV4wJ2/mLa8756Fy6iSXtlwGQbEqkYoIR4=
 github.com/goplus/gox v1.13.1-0.20240115155941-e657d899cb2e/go.mod h1:G7Hz+cAOUyJyN9pPHrpqhfQPDUtiJNmoRVTwoaQ9nw0=
-github.com/goplus/gox v1.13.1-0.20240124090446-576b08a67368 h1:16zrjGXKFES1T5EwfSAsIjSANprK2SHIYxKxwb5MlFY=
-github.com/goplus/gox v1.13.1-0.20240124090446-576b08a67368/go.mod h1:G7Hz+cAOUyJyN9pPHrpqhfQPDUtiJNmoRVTwoaQ9nw0=
+github.com/goplus/gox v1.13.1-0.20240124161318-c8def695918d h1:hz9JwmB4Vn1032V2lvVhHkVmajycCq9/uyfNKwQzu5g=
+github.com/goplus/gox v1.13.1-0.20240124161318-c8def695918d/go.mod h1:G7Hz+cAOUyJyN9pPHrpqhfQPDUtiJNmoRVTwoaQ9nw0=
 github.com/goplus/mod v0.12.2-0.20240107203906-5044606d0c51/go.mod h1:ZtlS9wHOcAVxZ/zq7WLdKVes1HG/8Yn3KNuWZGcpeTs=
 github.com/goplus/mod v0.12.2-0.20240123033711-abba4c2e8b32 h1:9eOpqJKwb/V3uxfM/CZ0V9Wn/a9NtSmfx2VyXics2+I=
 github.com/goplus/mod v0.12.2-0.20240123033711-abba4c2e8b32/go.mod h1:ZtlS9wHOcAVxZ/zq7WLdKVes1HG/8Yn3KNuWZGcpeTs=
diff --git a/x/build/build.go b/x/build/build.go
index 10fae033..0b99626e 100644
--- a/x/build/build.go
+++ b/x/build/build.go
@@ -21,6 +21,7 @@ import (
 	"fmt"
 	goast "go/ast"
 	"go/types"
+	"path"
 	"path/filepath"
 
 	"github.com/goplus/gop/ast"
@@ -30,7 +31,6 @@ import (
 	"github.com/goplus/gop/token"
 	"github.com/goplus/gox"
 	"github.com/goplus/gox/packages"
-	"github.com/goplus/mod/modfile"
 )
 
 type Class = cl.Class
@@ -76,7 +76,7 @@ func (p *Package) ToAst() *goast.File {
 }
 
 func ClassKind(fname string) (isProj, ok bool) {
-	ext := modfile.ClassExt(fname)
+	ext := path.Ext(fname)
 	switch ext {
 	case ".gmx":
 		return true, true


Test patch:
diff --git a/x/build/build_test.go b/x/build/build_test.go
index b09985c5..116776eb 100644
--- a/x/build/build_test.go
+++ b/x/build/build_test.go
@@ -44,7 +44,6 @@ func init() {
 	build.RegisterClassFileType(".tspx", "MyGame", []*build.Class{
 		{Ext: ".tspx", Class: "Sprite"},
 	}, "github.com/goplus/gop/cl/internal/spx")
-	build.RegisterClassFileType("_yap.gox", "App", nil, "github.com/goplus/yap")
 }
 
 func gopClTest(t *testing.T, gopcode interface{}, expected string) {
@@ -77,7 +76,6 @@ func TestKind(t *testing.T) {
 	testKind(t, "main.gmx", true, true)
 	testKind(t, "Cat.tspx", false, true)
 	testKind(t, "main.tspx", true, true)
-	testKind(t, "blog_yap.gox", true, true)
 }
 
 func TestGop(t *testing.T) {