primordic/IssueDupesLite huggingface dataset:
Repository: go-flutter-desktop/go-flutter

Issue #471: hover: Cannot obtain version information from hover build.
Created: 2020-06-13T15:09:54Z
Hover doctor

yazeed@Yazeed-AlKhalaf-Ubuntu:~/development/code/my_projects/flutter_projects/split_it$ hover doctor
hover: Cannot obtain version information from hover build. To resolve this, please go-get hover using Go 1.13 or newer.

Error output

Using hover run to build my application, I get the following
error:
yazeed@Yazeed-AlKhalaf-Ubuntu:~/development/code/my_projects/flutter_projects/split_it$ hover run
hover: ⚠ The go-flutter project tries to stay compatible with the beta channel of Flutter.
hover: ⚠     It's advised to use the beta channel: `flutter channel beta`
hover: Building flutter bundle
Font subetting is not supported in debug mode. The --tree-shake-icons flag will be ignored.
hover: Using engine from cache
hover: Cannot obtain version information from hover build. To resolve this, please go-get hover using Go 1.13 or newer.

Duplicate issue #483: Cannot obtain version information from hover build. To resolve this, please go-get hover using Go 1.13 or newer.
Created: 2020-06-30T04:07:38Z
cached_network_image: ^2.2.0+1
shared_preferences: ^0.5.7+3
spreadsheet_decoder: ^1.1.0
cupertino_icons: ^0.1.3
pull_to_refresh: ^1.6.0
progress_dialog: ^1.2.4
url_launcher: ^5.4.11
common_utils: ^1.2.1
file_picker: ^1.12.0
flutter_svg: ^0.17.4
fish_redux: ^0.3.4
encrypt: ^4.0.2
fluro: ^1.6.3
toast: ^0.1.5
intl: ^0.16.1
dio: ^3.0.9
Flutter 1.17.3 • channel stable • https://github.com/flutter/flutter.git
Framework • revision b041144f83 (4 weeks ago) • 2020-06-04 09:26:11 -0700
Engine • revision ee76268252
Tools • Dart 2.8.4
'go-flutter' is on version: v0.41.1
go version
go version go1.14.4 darwin/amd64
hover doctor
hover: Cannot obtain version information from hover build. To resolve this, please go-get hover using Go 1.13 or newer.

Closing comment (2020-06-30T08:01:03Z): Duplicate of #471 #441
Repository: go-flutter-desktop/go-flutter

Issue #489: Where to put a function to trigger on exit/stop/close event of application?
Created: 2020-07-08T15:26:23Z
I'm running a gRPC server via ffi and flutter Isolates, and when I close the application I keep getting the following waiting for isolates to check in.
I can make a function to stop the server, but I need to know where to put it to trigger on application close/exit action.
Can you please tell me how can I trigger a function to stop the server when exiting the application?
An Observatory debugger and profiler on Flutter test device is available at: http://127.0.0.1:50300/
go-flutter: closing application
Attempt:11 waiting for isolate _startGrpc to check in
Attempt:12 waiting for isolate _startGrpc to check in

This is the example code that I'm using to test go-flutter: https://github.com/satindergrewal/flutter-practice/tree/master/flutter_isolates
Thanks,
Satinder

Duplicate issue #567: Application closing event
Created: 2021-02-02T12:59:49Z
Hi is it possible to get an event on application close, or just before it?
Thanks.

Closing comment (2021-02-02T13:02:39Z): Duplicate of #489
Repository: go-flutter-desktop/go-flutter

Issue #156: Release builds
Created: 2019-06-09T15:16:39Z
I use the hover build command to generate a Windows executable, but there is a black console, how to publish a real program without a console.

Duplicate issue #106: Hover: windows
Created: 2019-04-03T10:30:47Z
Can we add the dependencies for Windows in the Readme.
https://github.com/go-flutter-desktop/hover/blob/master/README.md#install
Also for Windows it makes sense for Hover to build this way?
go build -ldflags -H=windowsgui

There is still other things to get working for windows, but adding this will allow lots of devs on windows to easily help dogfood and improve go-flutter.
Many devs i know are now using go-flutter and some are on windows.

Closing comment (2019-06-10T10:35:51Z): This issue is related to #156
Repository: go-flutter-desktop/go-flutter

Issue #314: hardware keyboard text selection
Created: 2019-11-18T22:40:36Z
The flutter team is implementing keyboard text selection movement at the framework level.
They are using the "flutter/keyevent" BasicMessageChannel as source of keyboard selection/movement events.
Currently go-flutter has implemented text selection movement at the embedder (glfw) level.
Work is duplicate (handlers in go-flutter and flutter for the same purpose), once everything is up on the framework side we should delete our handler. (textinput_{linux, windows, darwin}.go and some stuff in textinput-model.go)
Some related flutter PRs:
flutter/flutter#44130
flutter/flutter#42879
flutter/flutter#36316
BUG: Having duplicate handler for keyboard shortcut causes issue with pasting text, Ctrl-v is trigger twice, resulting in double pastes.

Duplicate issue #354: I can't use the backspace key to delete text on a textfield from the end.
Created: 2020-02-16T08:14:23Z
I can't use the backspace key to delete text on a textfield from the end.
But we can use the Del key, which is not consistent with our habits.

Closing comment (2020-02-17T10:43:38Z): Duplicate of #314
Please read #319 (comment)
Repository: go-flutter-desktop/go-flutter

Issue #123: Multiple root windows support
Created: 2019-04-16T16:01:25Z
Support an app opening multiple windows from the same app.
For example I'm an email app you may want to see 2 emails at the same time so you can compare them.
Or for a painting app, I might want to have the tools floating in another window.
Stuart added this to flutter engine :
flutter/flutter#30701
Strategy still being discussed it seems.
Regarding synchronisation, we could use an event bus at the golang level as a stop gap for now. But first need to be able to spawn new windows from the one app first

Duplicate issue #385: Multi-window support
Created: 2020-04-05T09:45:44Z
My application has a requirement, a new window pops up anywhere on the desktop, does it support this function？

Closing comment (2020-04-05T09:50:17Z): No sorry we don't have multiple window support yet.
Duplicate of #123
Repository: go-flutter-desktop/go-flutter

Issue #413: windows-msi: /usr/bin/ld: cannot find -lflutter_engine
Created: 2020-04-26T13:53:47Z
Command: hover build windows-msi --docker
Response:
...
docker container: # github.com/go-flutter-desktop/go-flutter/embedder
docker container: /usr/bin/ld: cannot find -lflutter_engine
docker container: collect2: error: ld returned 1 exit status
docker container: hover: Updating go-flutter to @latest version failed: exit status 2
hover: Docker run failed: exit status 1

Duplicate issue #429: hover: uses wrong LDflags when fetching dependencies during builds.
Created: 2020-05-07T22:29:45Z
when building darwin-dmg on linux using hover build --cache-path=/tmp darwin-dmg
it attempts to update go-flutter using the darwin flags flags which confuses the go build command because its running in a linux environment.
offending code
this results in the following situation in go-flutter#build.go:
# cgo ldflags environment specified by hover CGO_LDFLAGS=-F/tmp/hover/engine/darwin -Wl,-rpath,@executable_path
// build.go golang tooling attempts to load the flutter_engine.so file from /tmp/hover/engine/darwin
// because it detects the linux environment.

// #cgo linux LDFLAGS: -lflutter_engine -Wl,-rpath,$ORIGIN
// #cgo windows LDFLAGS: -lflutter_engine
// #cgo darwin LDFLAGS: -framework FlutterEmbedder
import "C"
this results in the following error:
# github.com/go-flutter-desktop/go-flutter/embedder
/usr/bin/ld: cannot find -lflutter_engine
collect2: error: ld returned 1 exit status
hover: Updating go-flutter to @v0.40.1 version failed: exit status 2

specifying GOOS=darwin causes other issues:
GOOS=darwin hover build --cache-path=/tmp darwin-dmg
../../../../go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.40.1/event-loop.go:10:2: build constraints exclude all Go files in /shared/james-lawrence/go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.40.1/internal/currentthread
../../../../go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.40.1/internal/opengl/opengl.go:12:2: build constraints exclude all Go files in /shared/james-lawrence/go/pkg/mod/github.com/go-gl/gl@v0.0.0-20190320180904-bf2b1f2f34d7/v3.3-core/gl
../../../../go/pkg/mod/github.com/go-flutter-desktop/go-flutter@v0.40.1/internal/opengl/opengl.go:13:2: build constraints exclude all Go files in /shared/james-lawrence/go/pkg/mod/github.com/go-gl/glfw/v3.3/glfw@v0.0.0-20200420212212-258d9bec320e

Closing comment (2020-05-25T16:28:30Z): Duplicate of #413
Please read: #413 (comment)
Should be fixed in: go-flutter-desktop/hover#142
Repository: go-gorm/gorm

Issue #6628: sqlite test (1.19 in ubuntu:latest) : table xxx has more than one primary key
Created: 2023-10-08T15:53:25Z
GORM PR Link
#6627
Description
i want to make PR to add some config for migrator, it has only minimal code changes. But the checks failed, here is details: https://github.com/go-gorm/gorm/actions/runs/6448509357/job/17505845740?pr=6627
I don't think this is caused by me, because when I comment out my changes, the problem still occurs.
here is the other test details: https://github.com/go-gorm/gorm/actions/runs/6448558597/job/17505952191?pr=6627
who can fix it?

Duplicate issue #6636: 使用gorm.Model创建表时出现主键错误
Created: 2023-10-10T07:04:42Z
我的环境
go 1.18
gorm.io/driver/sqlite v1.5.4
gorm.io/gorm v1.25.4

我的代码
var db *gorm.DB

type Assets struct {
	gorm.Model
}

func init() {
	var err error
	db, err = gorm.Open(sqlite.Open("assets.db"), &gorm.Config{})
	if err != nil {
		fmt.Println("连接数据库出错：", err.Error())
		return
	}

	db.AutoMigrate(&Assets{})
}

然后我得到了这个报错
table "assets" has more than one primary key
[0.036ms] [rows:0] CREATE TABLE `assets` (`id` integer PRIMARY KEY AUTOINCREMENT,`created_at` datetime,`updated_at` datetime,`deleted_at` datetime,PRIMARY KEY (`id`))

Closing comment (2023-10-10T07:44:55Z): I have the same issue. Is this a duplicate of #6628 ?

应该是的
Repository: go-gorm/gorm

Issue #6047: create in batch On Conflict got error instance 
Created: 2023-02-11T18:24:36Z
Description
the same question：
#5754
#3810
My experimental environment is as follows：
gorm version 1.24.5
mysql 5.7
go 1.19.1
At the same time, I wrote a simple CreateInBatches OnConflict function. When writing data, if the email has repeated updates to the UpdatedAt field.
type User struct {
	ID         uint64
	Email      string `gorm:"uniqueIndex:idx_email;type:varchar(256);"`
	UpdatedAt  time.Time
	CreatedAt  time.Time
}

func (u *user) Create(ctx context.Context, models []*model.User) error {
	return u.db.WithContext(ctx).Clauses(clause.OnConflict{
		Columns:   []clause.Column{{Name: "email"}},
		DoUpdates: clause.AssignmentColumns([]string{"updated_at"}),
	}).CreateInBatches(models, 100).Error
}	
Assume that the current user table has the following data



ID
Emaul
UpdatedAt
CreatedAt




1
test@test.com
2023-02-11 17:50:51.243
2023-02-11 17:50:51.243


2
apple@apple.com
2023-02-11 17:50:51.243
2023-02-11 17:50:51.243



Now I need to insert two data, namely test@test.com and apple@apple.com. I want to update the UpdatedAt field.
gorm does the following.
INSERT INTO `users` (`email`, `created_at`, `updated_at`)
VALUES ('est@test.com', '2023-02-12 01:55:44.966', '2023-02-12 01:55:44.966'),
       ('test-mail2', '2023-02-12 01:55:44.966', '2023-02-12 01:55:44.966')
ON DUPLICATE KEY UPDATE `updated_at`=VALUES(`updated_at`)
The user id I got was wrong, and the id started from 2, which is incredible.
Sincerely hope you can help me solve this problem, thank you.
@jinzhu

Duplicate issue #6360: Many2Many fails to create a join table record for an existing associated record
Created: 2023-05-29T18:27:17Z
go-gorm/playground#604
Description
Having problems with many2many, I went back to the basics and slightly modified the playground to fix the documentation first example. And it's not a success. The example being
type User struct {
  gorm.Model
  Languages []Language `gorm:"many2many:user_languages;"`
}

type Language struct {
  gorm.Model
  Name string
}

In a few words, if Name is not annotated to be unique, multiple identical Language records are created. If Name is annotated, then gorm when asked for an association of an existing language will try to create a join table entry those language_id = 0. This triggers a constraint violation.
More details are here: https://stackoverflow.com/questions/76358210/how-to-make-the-many2many-gorm-documentation-example-work

Closing comment (2023-06-01T06:11:45Z): Seems related to #6047
func TestGORM(t *testing.T) {
	tx := DB.Clauses(clause.OnConflict{DoNothing: true}).Session(&gorm.Session{})

	l1 := Language{Code: "ZH", Name: "Chinese"}
	tx.Create(&l1)

	l2 := &Language{Code: "ZH", Name: "Chinese"}
	tx.Create(&l2)

	if l1.ID != l2.ID {
		t.Errorf("l1.ID != l2.ID: %v != %v", l1.ID, l2.ID)
	}
}
Repository: go-gorm/gorm

Issue #261: GORM Column tag breaks Update
Created: 2014-10-23T15:01:28Z
Hi thanks for the nice and expressive package you've created.
I came across this problem, which seems to be a bug.
Idiomatic Go (i.e. GoLint) says id columns should be named ID, since this was not handled automatically by Gorm I tried using the column tag like this:
 ID                 uint32 `gorm:"column:id; primary_key: yes"`
However when calling Save(&r) to update an existing record, nothing happens. No errors, no logging, nothing.  Just fails, oh so silently. Removing the gorm tag and renaming the Column to Id brought back normal behaviour.
Would be great if:

Column alias would work in Updates etc.
Gorm would recognize ID as the same thing as Id.

Duplicate issue #267: gorm:"column" does not work as expected
Created: 2014-10-29T10:32:41Z
I am having a struct
type SomeStruct struct {
  ID   uint64 `gorm:"column:id; primary_key:yes"`
  Name string
  UUID string `gorm:"column:uuid;"`
}

but the resulting query is:
INSERT INTO `some_struct` (`name`,`u_u_i_d`) VALUES ('Some name','81aa15c9-f9ef-5e7c-662c-56c5434c3032')

Closing comment (2014-10-29T19:12:03Z): Same as #261 👍
Repository: go-gorm/gorm

Issue #5415: Find() uses values from the previous row in 1.23.6
Created: 2022-06-12T06:45:14Z
GORM Playground Link
go-gorm/playground#485
Description
It looks like DB.Model().Find() use values from the previous row if the current one has NULL in the cell that has default:NULL. This happens with SQLite driver and Gorm 1.23.6. Rolling back to 1.23.5 fixes the problem.

Duplicate issue #5450: v1.23.6 Find数据行错误
Created: 2022-06-23T07:56:11Z
GORM Playground Link

go-gorm/playground#1
Description
使用FIND查询数据到结构数组时，数据行错乱。第一行的数据可能填充到第三行了。恢复到v1.23.5 问题消失

Closing comment (2022-06-23T09:16:37Z): duplicate of #5415
Repository: go-gorm/gorm

Issue #4372: Bug: self-referential has-one does not create foreign key
Created: 2021-05-12T15:48:28Z
go-gorm/playground#322
In the existing playground models the user foreign key (manager_id) gets created by the has-many Team relation.
When that is no longer present no foreign key is created for the self-referential has-one relation corresponding to the Manager member.
This is a test case which shows this bug with a separate model:
type Task struct {
	gorm.Model
	Content  string    `gorm:"not null; default:Empty Task" json:"content"`

	ParentTaskID *uint `gorm:"not null" json:"parent_task_id"`
	ParentTask   *Task `gorm:"foreignKey:ParentTaskID" json:"-"`
}
When this is AutoMigrated, parent_task_id isn't marked as a foreign key.

Duplicate issue #4458: PostgreSQL foreign key not created on self-reference
Created: 2021-06-13T12:21:35Z
GORM Playground Link
go-gorm/playground#340
Description
I am making an application that manages a file system. However, I noticed that AutoMigrate does not create a foreign key in postgres for self-references. Am I doing something wrong or is this a bug?

Closing comment (2021-06-13T12:26:29Z): Turns out this is a duplicate of #4372
Closing...
Repository: go-gorm/gorm

Issue #5287: Log only parameterized SQL statements without any values
Created: 2022-04-22T18:52:36Z
I'm logging this as a bug because it's a security problem.
Description
This was mentioned in #4858, but that issue was closed.
When logging SQL, Gorm logs the full SQL which is generally considered a bad practice. eg
SELECT * FROM `users` WHERE email = "foo@example.com" ORDER BY `users`.`id` LIMIT 1
This causes problems by leaking sensitive fields into the logs, especially when doing inserts and updates. A parameterized version of the query that's always safe to log would be:
SELECT * FROM `users` WHERE email = ? ORDER BY `users`.`id` LIMIT 1
A custom logger here isn't enough, because it doesn't expose the parameterized sql, just the final result with values, and parsing the log line to filter it is both expensive and unrealistic
This would involve changing the Execute function in callbacks.go from
	if stmt.SQL.Len() > 0 {
		db.Logger.Trace(stmt.Context, curTime, func() (string, int64) {
			return db.Dialector.Explain(stmt.SQL.String(), stmt.Vars...), db.RowsAffected
		}, db.Error)
	}
to
	if stmt.SQL.Len() > 0 {
		db.Logger.Trace(stmt.Context, curTime, func() (string, int64) {
			return stmt.SQL.String(), db.RowsAffected
		}, db.Error)
	}

Duplicate issue #5248: ExplainSQL does not show the correct time zone for time parameters
Created: 2022-04-11T20:11:56Z
GORM Playground Link

go-gorm/playground#465
jsgoupil@95f5807
Description
The ExplainSQL does not display the time zone when displaying a time. The following times,
now := time.Now()
nowInPST := now.In(pst)
nowInEST := now.In(est)

are all equivalent. However, when you display the SQL, they will appear to be different.
What is saved in the database is correct; it's only what is in the ExplainSQL that doesn't work.
I added 2 time zones because one can pass if your computer is in that time zone.
I am in PST, so it works, but it will fail with the EST.
sql_test.go:118: Explain SQL #8 expects
create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values ("jinzhu?", 1, 999.990000, true, "12345", "2020-02-23 11:10:10", "2020-02-23 11:10:10", NULL, "w@g.\"com", "admin", "pass"),
but got
create table users (name, age, height, actived, bytes, create_at, update_at, deleted_at, email, role, pass) values ("jinzhu?", 1, 999.990000, true, "12345", "2020-02-23 14:10:10", "2020-02-23 11:10:10", NULL, "w@g.\"com", "admin", "pass")

Closing comment (2022-06-10T05:36:38Z): Maybe we need to add config to ExplainSQL/Explain to support hidden sql vars or define time output format, but this is a breaking change.
related to #5287
Repository: go-gorm/gorm

Issue #2886: GORM v2 is on going
Created: 2020-02-16T01:46:08Z
Hello All,
GORM v2 is under active development (https://github.com/jinzhu/gorm/tree/v2_dev), going to release in the next two months.
Before that, I am NOT going to merge any pull requests based on the master branch.
V2 will be overwritten from scratch with similar public API, it would focus on performance, improve usability and fix fragile designs. We will provide a migration guide to help users migrate before the release.
With the new architecture, it opens the possibility to have a better migration tool, a static code generator that generates type-safe code with all the features of GORM, visualizes models and its relationships to help a new team member quickly understand your project, and even support Redis & MongoDB...
Your code review or suggestions would be much appreciated, please comment to this thread, thank you.

Duplicate issue #2924: GORM release schedule
Created: 2020-03-11T08:07:00Z
Guys could you say us something about GORM release plans?

Closing comment (2020-03-11T08:34:04Z): Kind of duplicate: #2886
Repository: go-gorm/gorm

Issue #946: model update doesn't set values
Created: 2016-04-03T22:41:37Z
it does with .Table but I think it should with .Model too
DBcon.Debug().Table("users").Where("ID =?", test_user_id).Updates(map[string]interface{}{"notify_tkn": "shittytoken", "notify_via": "a"})
[2016-04-04 00:36:07]  [0.39ms]  UPDATE `users` SET `notify_tkn` = 'shittytoken', `notify_via` = 'a'  WHERE (ID ='UserUserUserUserUser01')

DBcon.Debug().Model(User{}).Where("ID =?", test_user_id).Updates(map[string]interface{}{"NotifyTkn": "shittytoken", "NotifyVia": "a"})
[2016-04-04 00:36:07]  [0.37ms]  UPDATE `users` SET `notify_tkn` = '', `notify_via` = '', `updated_at` = '2016-04-04T00:36:07+02:00'  WHERE (ID ='UserUserUserUserUser01')

DBcon.Debug().Model(User{}).Where("ID =?", test_user_id).Updates(User{NotifyTkn: "shittytoken", NotifyVia: "a"})
[2016-04-04 00:36:07]  [0.37ms]  UPDATE `users` SET `notify_tkn` = '', `notify_via` = '', `updated_at` = '2016-04-04T00:36:07+02:00'  WHERE (ID ='UserUserUserUserUser01')

UPDATE:
I forgot to note, that this used to work.
I reverted back to, because I would have to change all the code to .Table to make my app work again.
.Table has a disadvantage, when a models attribute is changed all queries need be refactored by hand, while attribute names in
DBcon.Debug().Model(User{}).Where("ID =?", test_user_id).Updates(User{NotifyTkn: "shittytoken", NotifyVia: "a"})

would change automatically.
working version for those who upgraded and have problems (getgb.io)
        "importpath": "github.com/jinzhu/gorm",
        "repository": "https://github.com/jinzhu/gorm",
        "revision": "aa45da15421ddb1549a7060e5c189f8350a29166",
        "branch": "master"

Duplicate issue #923: model update异常
Created: 2016-03-24T10:53:48Z
理论上，或者说理想中，Update应该是
db.Model(model.A{}).Where(" ? ? ? ",a,a,a).Update("status","success")，
db.Model(model.A{}).Where(" ? ? ? ",a,a,a).Updates(map[]{}{status,success})，
当然文档中并没有这种用法，但是按照常理是应该支持的…
实际上从debug模式中看到生成的SQL where部分一切正常，
只是update部分有一个问题，
变成了 update status = ""，
“success”没有传进去。

Closing comment (2016-04-04T07:47:19Z): same as #946
Repository: go-task/task

Issue #1148: Segfault if version missing
Created: 2023-05-02T13:22:16Z
Task version: v3.24.0 (h1:0DKsGTmqYbEaACffm9H2BOm8pTcuSnb5SRUl7TCilQ4=)
If the version: '3' line is missing, go-task runs into a segfault.
Follow these steps to reproduce:

go-task --init
Open Taskfile.yml and comment version: '3'.
Run go-task
Instead of a descriptive error message a segmentation violation occurs.

Duplicate issue #1394: SIGSEGV on missing "version" attribute
Created: 2023-11-09T11:06:38Z
Task version:  v3.24.0
Operating system: Ubuntu (WSL)
Experiments enabled: No

When including a taskfile which does not have a "version" attribute set, a SIGSEGV is thrown
[signal SIGSEGV: segmentation violation code=0x1 addr=0x0 pc=0x617ba9]

goroutine 1 [running]:
github.com/Masterminds/semver/v3.(*Version).Compare(0xc000022f00?, 0x44?)
        github.com/Masterminds/semver/v3@v3.2.1/version.go:406 +0x29
github.com/go-task/task/v3/taskfile/read.Taskfile(0xc000203290)
        github.com/go-task/task/v3@v3.24.0/taskfile/read/taskfile.go:172 +0x1de

This should be handled gracefully

Closing comment (2023-11-10T01:45:29Z): Sounds like a duplicate of #1148.
This was fixed in #1149 and released in v3.25.0. Can you please try updating your task version and see if it resolves the issue?
Repository: go-task/task

Issue #53: Multiple tasks with the same dependency should run dependency once!
Created: 2017-07-15T14:53:41Z
UPDATE: This is a general feature request to not run equal dependencies more than once. E.g. if task A and task B both depend on taskC, running both task A and task B in parallel (witin one instance of task), should be able to resolve the dependencies so that taskC is only run once, and this is the interesting port, if it's equal, which we will get to next.
what makes a task equal?
Since you can pass variables to tasks, it's not enough to just look at the name. The best option is probably to rely on a hash of the name + sorted and resolved input variables. A close second could be to rely on unresolved but still sorted input variables, which is not perfect, but could be an acceptable trade-off if it's somehow easier in code.

Original description
I have multiple tasks in my Taskfile that depend on a single task called go-dep that runs the command glide install. When I run task to build multiple targets, I would expect go-dep to be called at most 1 time (zero if it's found to be up-to-date). Instead, I see it's called once for each task that depend on it:
$ task
task: No argument given, trying default task
glide install
glide install
glide install
glide install
PS! go-deps in this case is called with no vars, but the rule should really apply to run a dep at most 1 time when the vars are exactly the same.

Duplicate issue #355: Diamond dependency executed multiple times
Created: 2020-07-30T05:58:23Z
Hi,
If I have a task file like this:
version: '2'

tasks:
  top:
    deps: [depA, depB]

  depA:
    deps: [depC]

  depB:
    deps: [depC]

  depC:
    cmds:
      - echo "hello world!"
And I execute the top task, it will end up echoing "hello world!" to the console twice. Would you consider addressing this as "out of scope" for task, or perhaps changing it to only run depC once might be backwards-incompatible? (Maybe users expect it to run twice)
The reason I ask is because I have a preference that depC only run once in this scenario. My imagination is lacking, but I can't imagine a scenario where you might actually want depC to run twice - but I won't discount the possibility.
I'd be happy to try attempt a PR to introduce functionality to only execute depC once, but I don't wish to waste your time with a PR that might not be helpful.
Thanks!

Closing comment (2020-07-30T06:02:07Z): My bad, I see now this is a duplicate of #53!
Repository: go-task/task

Issue #1038: Environment variables from shell takes precedence over task file definition
Created: 2023-03-07T06:31:58Z
Hey 👋
I guess I have found a bug yesterday on task: It looks like previously defined environment variable are not overwritten by the definition within the task file.
Taskfile
version: '3'

silent: true

tasks:
  default:
    env:
      KEY: 'other'
    cmds:
      - echo "$KEY"
Expected
I would expect the environment variable of KEY to be overwritten whatever the outside environment looks like.
$ task
other
$ KEY=some task
other
Actual
The environment variable from the outside shell takes precedence over the variable defined within the taskfile.
$ task
other
$ KEY=some task
some
Os + Taskfile-version
$ cat /etc/lsb-release 
DISTRIB_ID=LinuxMint
DISTRIB_RELEASE=21.1
DISTRIB_CODENAME=vera
DISTRIB_DESCRIPTION="Linux Mint 21.1 Vera"
$ task --version
Task version: v3.21.0 (h1:pVGAGXxJ9Pk5mvjqv/CsdAD4ZIzNMjF+vrXMueM/WFk=)
Why is that problem?

I have not found any reference to that behavior in the docs.
I love to clearly define my environment when using task rather than relying on any other outer state. In that case it's impossible to overwrite previously defined variables which may be a huge issue.

Duplicate issue #1630: Define ENV vars not static
Created: 2024-05-01T16:38:58Z
Given the current taskfile:
version: 3

tasks:
  default:
    env:
      EFOO: "little env foo"
      EBAR: "little env bar"
    vars:
      VFOO: "little var foo"
      VBAR: "little var bar"
    cmds:
      - cmd: echo $EFOO
      - cmd: echo $EBAR
      - cmd: echo {{.VFOO}}
      - cmd: echo {{.VBAR}}

With the given invocation:
EBAR="BIG ENV BAR" VBAR="BIG VAR BAR" task

Outputs:
task: [default] echo $EFOO
little env foo
task: [default] echo $EBAR
BIG ENV BAR
task: [default] echo little var foo
little var foo
task: [default] echo little var bar
little var bar

Since the ENV defined in the taskfile are static AND they are not using the {{ default ...}} pattern I would expect that all output says "little...". Am I mistaken? Also shouldn't vars and env behave the same?
Thanks for clarifying this case.

Task version: v3.36.0 (h1:XVJ5hQ5hdzTAulHpAGzbUMUuYr9MUOEQFOFazI3hUsY=)
Operating system: macOS 14.4.1
Experiments enabled: remote taskfiles (but it should not affect this case)

Closing comment (2024-05-01T17:08:09Z): Hello !
I think it's related to :

#1038

Env variable from the shell takes precedence over env defined in the Taskfile.
Repository: go-task/task

Issue #1246: When a parallel task fails allow the other parallel tasks to finish before exiting with failure
Created: 2023-06-30T15:28:08Z
Currently when a parallel task fails, Taskfile will kill the other running process.
If you have a running a long-running task like terraform, this will break processes and might leave the task in a bad state.
We should have a config or flag to allow the parallel tasks to complete before quitting with error from the failed task.
this is similar to:
#1226

Duplicate issue #1853: Support running all tasks even on errors
Created: 2024-10-03T08:27:15Z
So in my use case I'm consolidating all different linters (among other things) to be ran with the Taskfile. See the snippet below for the general structure.
When running linters it would be nice to run all of them always (the same is especially true with the for loop) and once they're all ran to return an error if any of them errored. I could work around this by using longer shell scripts but I would prefer not to.
I'm thinking something like a run_all: always parameter. The default for which could be the current behaviour of stop-on-first-error.
The ignore_error works otherwise but it also ignores the error code, meaning that when the linters are ran in CI it will not cause the run to fail.
tasks:
  lint:
    deps: [lint:terraform:fmt, lint:terraform:tflint]

  lint:terraform:fmt:
    dir: infra
    cmd: "terraform fmt -check -recursive"

  lint:terraform:tflint:
    deps: [install:tflint]
    dir: infra
    vars:
      STACKS:
        sh: "echo stacks/*"
    cmd:
      for:
        var: STACKS
      cmd: "tflint --config=../../.tflint.hcl --chdir={{ .ITEM }}"

Closing comment (2024-10-21T15:17:19Z): This is probably a duplicate of #1246
I posted an earlier iteration of the workaround I use on that issue.
This feature would be really nice.
Repository: go-task/task

Issue #294: Add global preconditions
Created: 2020-02-11T10:03:50Z
It would be great to be able to set global preconditions to prevent running any tasks in a Taskfile and its children if the precondition is not met. This would be a simple way to add a precondition to all tasks without having to add the same precondition to every task individually.
The use case for this is for example to enforce that a repository has been initialized somehow before allowing to run any other tasks, like setting up release targets for goreleaser or similar. In this example I would have the .goreleaser.yml contain a string like "INIT_PACKAGE" which should be replaced by the package name of the repository, and until that's done all tasks should fail (precondition greps for "INIT_PACKAGE"), and return the same message "This repository hasn't been initialized, please run 'task init'".
Obviously to be able to run the initial task init there needs to be a property to disable the global precondition for that specific task. So the Taskfile would end up something like this:
version: '2'

preconditions:
    - grep INIT_PACKAGE .goreleaser.yml
      msg: "this repository needs to be initialized, run 'task init' to continue"

tasks:
  build:
    desc: build go project
    cmds:
      - go build .
  
  init:
    desc: initalize repository
    cmds:
      - sed -i 's/INIT_PACKAGE/myPackage/g' .goreleaser.yml
    ignore_preconditions: yes

Also the logic should probably be that any preconditions from the parent Taskfile which includes other taskfiles should be applied on all the child taskfiles' tasks as well, i.e. they inherit the parent's global preconditions. The preconditions should only be propagated downwards in the hierarchy meaning that the parent Taskfile doesn't inherit global preconditions from it's children. Or maybe there should be a property to select this behavior as well, "include_preconditions: yes/no"?

Duplicate issue #405: Global preconditions
Created: 2020-11-16T19:11:25Z
I'm new with Taskfile. I start to write my first Taskfile.yaml and I realize a serious problem : preconditions.
It's a great option but from what I see we can't store a precondition so I have several duplications.
It would be nice if we can have something similar to:
# Global preconditions available for all tasks
preconditions:
    my-first-condition:
        - sh: "[ 1 = 0 ]"
        msg: "One doesn't equal Zero, Halting"

    my-second-condition:
        - sh: "[ 1 = 0 ]"
        msg: "One doesn't equal Zero, Halting"

tasks:
    my-first-task:
        # ...
        preconditions:
            - precondition: my-first-condition
            - precondition: my-second-condition
So like when you reference a task to be executed in a task. Or if you have a better idea...

Closing comment (2022-10-15T02:14:20Z): Duplicate of #294
Repository: go-task/task

Issue #273: Add option to 'flatten' included taskfiles
Created: 2019-12-08T15:55:52Z
It would be great to be able to set an option to avoid having to call the tasks using the task includename:task syntax when including a taskfile.
So this example assumes you have files like:
./Taskfile.yml
./common/Taskfile.yml
The use case for this is when creating a main Taskfile for a repository and importing some common tasks, lets say "list", "clean" and "version", right now I need to then call task common:clean etc to run them.
Instead I would like to be able to do something like this in my main taskfile:
includes:
  common: ./common
    flatten:true
    override: false

Where the 'flatten' property would define that the tasks from 'common' should be available as if they were present in the main taskfile, so "task clean" would actually call "task common:clean". This would probably have to throw a conflict error if the "clean" task exists in both the main taskfile and the 'common' one, meaning that anything from an included taskfile that would be flattened out needs to be unique. Possibly an "override" property could be added instead, to let the included task take precedence over any task with the same name in the main taskfile.
This kind of functionality would allow you to add taskfiles as a submodule to a repository, create a main taskfile for that repo where you include the submodule taskfiles, and still be able to run common tasks with a short syntax without having to point out the sub-taskfile. Or in other words include other taskfiles as transparent "libraries".

Duplicate issue #930: extend a file instead of including
Created: 2022-11-11T08:25:37Z
Say I want to have all sorts of complicated commands in a committed version of a taskfile, that require certain variables, like aws-profile names.
Then I would love for a file to extend the base namespace with these variables and personal commands.

Closing comment (2022-11-11T10:52:47Z): Sounds like a duplicate of #273
Repository: go-task/task

Issue #264: Setup bash & zsh autocomplete as part of brew install
Created: 2019-11-13T12:05:03Z
Now that we have bash & zsh autocomplete scripts in this repo, we can install them as part of installation with homebrew.
I've noticed that we have this formula already: https://github.com/go-task/homebrew-tap/blob/master/Formula/go-task.rb
Adding 2 lines to the formula, will do that for us:
    bash_completion.install "completion/bash/task.bash" => "task"
    zsh_completion.install "completion/zsh/_task" => "_task"

I was just testing this on my machine today. Happy to raise a PR for that if it's fine.
Thanks

Duplicate issue #382: Homebrew tap should install shell completions
Created: 2020-10-02T12:16:23Z
https://github.com/go-task/homebrew-tap should install shell completions from https://github.com/go-task/task/tree/master/completion
Here is an example of how to do it:

https://github.com/Homebrew/homebrew-core/blob/6a8f5692ae05d70f347ce194d9cd892370712239/Formula/hub.rb#L30-L32

The released tar.gz archives will need to package up the completions on release so that they are available for install by Homebrew. Currently, the completions are not included in the release artifacts.

Relates to #293

Closing comment (2020-10-12T13:38:36Z): Closing as a duplicate of #264
Repository: gobuffalo/buffalo

Issue #67: running multiple `buffalo` commands causes a "timeout"
Created: 2016-12-19T02:19:41Z

Duplicate issue #113: Buffalo sub-commands unavailable
Created: 2017-01-12T03:51:12Z
I've noticed that when I an running "buffalo dev" some sub-commands give a timeout error such as the generators, until I stop the buffalo dev server.
$ buffalo g --help
timeout

$ buffalo g resource hosts
timeout

Is this due to the generators needing access to the database?

Closing comment (2017-01-12T12:07:03Z): Closing as a dup of #67
Repository: gobuffalo/buffalo

Issue #515: How to start app at 0.0.0.0:3000?
Created: 2017-07-13T23:51:08Z
I run buffalo application inside docker container,  I want to do like this:
app := actions.App()
log.Fatal(app.Start("0.0.0.0:3000"))

Duplicate issue #518: Buffalo can't bind on fixed IP
Created: 2017-07-14T11:22:09Z
The current buffalo Start app takes a port, but in some cases (proxying for instance), we must be able to fix the listening address.

Closing comment (2017-07-14T11:22:30Z): Related to #515.
Repository: gobuffalo/buffalo

Issue #629: Error: you need to be inside your buffalo project path to run this command
Created: 2017-09-09T00:05:05Z
I am getting error below while running buffalo dev and buffalo generate on a fresh buffalo new project.
Error: you need to be inside your buffalo project path to run this command

Buffalo Version
v0.9.4
Go Version
go version go1.9 linux/amd64

Duplicate issue #749: `buffalo new` is working unexpectedly
Created: 2017-11-11T20:32:41Z
I have using buffalo new  to generate a project, but looks generated a incomplete Go project.
⋊> ~/P/g/p/s/atlas on master  $ ls
assets       database.yml grifts       models

Closing comment (2017-11-12T02:39:23Z): Thinking about it, I think you are having this issue: #629
Did you install Buffalo to your $GOPATH and then create a new $GOPATH to "test" Buffalo? If so, the problem is the templates for generating a new application are in your first $GOPATH and they can't be found from you second $GOPATH.
I'm going to close this, since I believe it's a dup of #629. If using just one $GOPATH doesn't solve your problem, please re-open.
Repository: gobuffalo/buffalo

Issue #94: Add support for mail
Created: 2017-01-07T16:12:15Z

Duplicate issue #292: adding mailer
Created: 2017-03-17T07:59:53Z
hi,
i would like to suggest a default mailer, as example :)
https://gist.github.com/u007/7cea82c4c4dc5e219661b8e5d9acf9bc

Closing comment (2017-06-26T12:42:02Z): This is a duplicate of #94
Repository: gobuffalo/buffalo

Issue #96: Add a form builder helper 
Created: 2017-01-07T16:15:33Z
Bonus points for it to be swapped out for one that generates bootstrap markdown.
Useful things are:

Support for "models" and the gorilla scheme package
error handling
bootstrap
csrf

Duplicate issue #19: add a form generator to helper
Created: 2016-12-07T16:24:45Z

Closing comment (2017-01-07T19:00:04Z): dup of #96
Repository: gobuffalo/buffalo

Issue #509: Make Routes in help clickable
Created: 2017-07-12T16:52:58Z
It's awesome that you get a list of routes when you develop.  it would be cool if those routes had a clickable path to quickly navigate to those routes.

Duplicate issue #800: make routes path item clickable.
Created: 2017-12-15T19:36:47Z
Just a small Enhancement, Why not make the path in the default home routes page clickable, so we can use it to navigate to the route while building an app.

Closing comment (2017-12-15T19:48:28Z): Closing as it's a dup of #509
Repository: gohugoio/hugo

Issue #5687: Taxonomies names does not match urlized
Created: 2019-02-10T02:11:22Z
The documentation here says:
https://gohugo.io/content-management/taxonomies/#preserve-taxonomy-values

"Therefore, if you want to have a taxonomy term with special characters such as Gérard Depardieu instead of Gerard Depardieu, set the value for preserveTaxonomyNames to true in your site config."


"Note that if you use preserveTaxonomyNames and intend to manually construct URLs to the archive pages, you will need to pass the taxonomy values through the urlize template function."

However, in v0.54.0 this is not the behaviour I am seeing. preserveTaxonomyNames is false, but names are not normalized.
I have defined a taxonomy called "author" which has peoples names in it.
However, when I do:
    {{ with $.Site.GetPage (printf "/author/%s" ( $author | urlize )) }}
      <a href="{{ .RelPermalink }}">{{ $author }}</a>
    {{ end }}

It doesn't get the page for authors with accents in their names
{{ "Olivier Cochard-Labbé" | urlize }} = olivier-cochard-labb%C3%A9

but the taxonomy is: olivier-cochard-labbé
How do I encode the url the same way that the taxonomy is encoded, or get the taxonomy to be urlize'd?

Duplicate issue #6546: Broken taxonomy list in a single page template because of some characters
Created: 2019-11-27T14:29:44Z
Briefly
Tag list (or any other taxonomy list) in a single page don't show some page tags because of urlized characters.
What version of Hugo are you using (hugo version)?
$ hugo version
Hugo Static Site Generator v0.60.0-F2DEA9B0 darwin/amd64 BuildDate: 2019-11-27T10:09:53Z

Other tested versions:
Hugo Static Site Generator v0.54.0-B1A82C61 darwin/amd64 BuildDate: 2019-02-01T09:40:48Z
Hugo Static Site Generator v0.48 darwin/amd64 BuildDate: 2018-08-29T06:33:08Z

Reproduction steps

Use current Example: List Tags in a Single Page Template as a tag list template:

{{ $taxo := "tags" }}
<ul id="{{ $taxo }}">
    {{ range .Param $taxo }}
        {{ $name := . }}
        {{ with $.Site.GetPage (printf "/%s/%s" $taxo ($name | urlize)) }}
            <li><a href="{{ .Permalink }}">{{ $name }}</a></li>
        {{ end }}
    {{ end }}
</ul>


Add tag "Révolution française" to any post:

tags:
  - "Révolution française"
Actual results:
Empty tag list.
Expected results:
Tag list with a clickable tag.
Additional notes:
This is happens because .GetPage function assume to get string like:
/tags/révolution-française

But, because of urlize, we have string like:
/tags/r%C3%A9volution-fran%C3%A7aise

I have two concerns about this:

This is expected .GetPage behavior?
If answer is yes, then anchorize instead of urlize could solve this problem for all predicted use cases or not? It works, but maybe this can cause some potential side effects?

I don't know it's a .GetPage or Hugo Docs problem, anyway, this needs some action or clarification.

Closing comment (2020-03-04T13:01:09Z): Duplicate of #5687?
Repository: gohugoio/hugo

Issue #7437: Language code in resource filename kept in RelPermalink
Created: 2020-06-28T16:16:53Z
As in the example below:
index.md
style.en.css
style.fr.css
The language indicators tells Hugo what language/site they belong to, but currently these would be published to https://example.com/style.en.css and https://example.com/style.fr.css.
The above was never intended, and probably the reason why we did not discover #7436

Duplicate issue #9557: Remove the language id from page resources when publishing multilingual page bundles
Created: 2022-02-24T06:56:48Z
I am not sure if this is (a) a defect, (b) an improvement, or (c) a dumb idea.
content structure
content/about
├── example.es.png
├── example.png
├── index.es.md
└── index.md

content/about/index.md
![](example.png)
content/about/index.es.md
![](example.png)   <-- user wants to exclude language id from image name, for a very good reason
Build the site
public/
├── about/
│   ├── example.png
│   └── index.html
├── es/
│   ├── about/
│   │   ├── example.es.png  <-- could/should this be named example.png instead?
│   │   └── index.html
│   └── index.html
└── index.html

With this setup, the img element in public/es/about/index.html refers to a non-existent path:
<img src="example.png" alt="">
The proposed solution is to remove the language id from page resources when publishing multilingual page bundles. This is not limited to images; it would be applied to all page resources.
We have made this setup work with an image render hook that falls back to a language-specific resource, but it seems like we shouldn't have to do this. Maybe.
Minimal reproducible example:
git clone --single-branch -b hugo-github-issue-9557 https://github.com/jmooring/hugo-testing hugo-github-issue-9557
cd hugo-github-issue-9557
hugo
tree public
grep img public/es/about/index.html
Reference: https://discourse.gohugo.io/t/multi-language-images-and-page-bundles/37325

Closing comment (2024-01-23T15:44:18Z): Duplicate of #7437.
Repository: gohugoio/hugo

Issue #8523: Add Permalink option for section pages
Created: 2021-05-11T21:06:57Z
I have something like the following option in the config.toml:
[permalinks]
posts = "/new-posts/:filename/"

If I visit http://localhost:1313/new-posts/post-name/ I get the intended page. But if I visit http://localhost:1313/new-posts/ I don't get the list page, as I would expect. Instead, I get nothing at all.  I still have to go to http://localhost:1313/posts/ to get the list page.
The version I'm using:
hugo v0.83.1+extended linux/amd64 BuildDate=unknown

I'm not sure if this behavior is intended. But it would be a good idea to have the ability to change the URL of the list pages using the permalinks option as well. Right now, I have to add the url parameter in the front matter of the _index.md to make the list page have the different url.

Duplicate issue #9327: Permalink configuration allowing directory structure
Created: 2021-12-27T17:47:13Z
There seems to be no way to reflect the directory structure in a section when setting the permalink in the config (and mimic the default behaviour). Adding a variable like ‘:dir’ or ‘:filepath’ would allow using config permalinks in combination with directory structures (without creating subsections).
Default behaviour for section 'cars' (without _index.md files and thus without subsections):
filepath: /content/cars/mercedes/suv/s560.md
URL: /cars/mercedes/suv/s560/
You cannot get this result when setting the permalink in the config. The closest you can get is by using ':sections', but that requires you to use _index.md files (thus subsections).
More info:
https://discourse.gohugo.io/t/permalink-with-directory-structure/36203/10

Closing comment (2022-12-28T22:11:43Z): Duplicate of #8523