Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[TW-1707] Context can leak into modifications #1731

Closed
taskwarrior opened this issue Feb 14, 2018 · 2 comments
Closed

[TW-1707] Context can leak into modifications #1731

taskwarrior opened this issue Feb 14, 2018 · 2 comments
Labels
type:bug Something isn't working
Milestone

Comments

@taskwarrior
Copy link

Tomas Babej on 2015-09-22T08:46:12Z says:

The nature of the error is explained by the following command:

{code}
ttask rc.debug.parser=1 +ACTIVE stop
Stopping task 2 'test'.
Stopped 1 task.
Timer Config::load (/usr/local/share/doc/task/rc/solarized-dark-256.theme) 0.000127 sec
Timer Config::load (/home/tbabej/.taskrc) 0.000954 sec
Filter::subset
_original_args
task rc.data.location=/tmp/ttask rc.debug.parser=1 +ACTIVE stop
_args
arg basename='task' raw='task' ORIGINAL BINARY TW
arg name='data.location' raw='rc.data.location=/tmp/ttask' value='/tmp/ttask' ORIGINAL CONFIG
arg name='debug.parser' raw='rc.debug.parser=1' value='1' ORIGINAL CONFIG
argTag raw='tags' ATTRIBUTE FILTER
argTag raw='hastag' OP FILTER
argTag raw=''ACTIVE'' LITERAL FILTER
arg canonical='stop' raw='stop' ORIGINAL CMD WRITECMD

Applying context: school
Derived filter: '( tags hastag 'ACTIVE' )'
Filtered 3 tasks --> 1 tasks [all tasks]
CLI Parser
_original_args
task rc.data.location=/tmp/ttask rc.debug.parser=1 +ACTIVE stop ( project:Education.School )
_args
arg basename='task' raw='task' ORIGINAL BINARY TW
arg name='data.location' raw='rc.data.location=/tmp/ttask' value='/tmp/ttask' ORIGINAL CONFIG
arg name='debug.parser' raw='rc.debug.parser=1' value='1' ORIGINAL CONFIG
argTag raw='tags' ATTRIBUTE FILTER
argTag raw='hastag' OP FILTER
argTag raw=''ACTIVE'' LITERAL FILTER
arg canonical='stop' raw='stop' ORIGINAL CMD WRITECMD
arg raw='(' ORIGINAL MODIFICATION
arg name='project' raw='project:Education.School' value='Education.School' ORIGINAL MODIFICATION ATTRIBUTE MODIFIABLE
arg raw=')' ORIGINAL MODIFICATION

Task::modify
MODIFICATION project <-- 'Education.School' <-- 'Education.School'
MODIFICATION new annotation <-- '( )'
pending.data rw O T0002+000001 L0002+000
completed.data rw - T0001+000
000 L0001+000
undo.data rw O T0000+000000 L0004+004
backlog.data rw O T0000+000
000 L0001+001

Perf task 2.4.4 df49aab 20150922T085008Z init:2516 load:101 gc:0 filter:849 commit:79 sort:0 render:0 hooks:2 total:3547

Using alternate data.location /tmp/ttask
Configuration override rc.data.location:/tmp/ttask
Configuration override rc.debug.parser:1
{code}

Might be applicable to more than 'stop' command.

@taskwarrior taskwarrior added this to the 2.5.0 milestone Feb 14, 2018
@taskwarrior taskwarrior added type:bug Something isn't working fixed labels Feb 14, 2018
@taskwarrior
Copy link
Author

Migrated metadata:

Created: 2015-09-22T08:46:12Z
Modified: 2015-09-24T12:41:59Z

@taskwarrior
Copy link
Author

Tomas Babej on 2015-09-24T12:41:29Z says:

Whoops!

I just realized this was tested on 2.4.4, and is already fixed in 2.5.0.

Sorry for the noise.

{code}
ttask rc.debug=1 rc.debug.parser=1 +ACTIVE stop
Stopping task 1 'test'.
Stopped 1 task.
Timer Config::load (/usr/local/share/doc/task/rc/solarized-dark-256.theme) 0.000094 sec
Timer Config::load (/home/tbabej/.taskrc) 0.000663 sec
Applying context: school
Parse Tree (before command-specifіc processing)
_original_args
task ( project:Education.School ) rc.data.location=/tmp/ttask rc.debug=1 rc.debug.parser=1 +ACTIVE stop
_args
word basename='task' raw='task' BINARY
op raw='(' QUOTED FILTER
pair canonical='project' modifier='' name='project' raw='project:Education.School' separator=':' value='Education.School' FILTER
op raw=')' QUOTED FILTER
pair modifier='data.location' name='rc' raw='rc.data.location=/tmp/ttask' separator='=' value='/tmp/ttask' CONFIG ORIGINAL
pair modifier='debug' name='rc' raw='rc.debug=1' separator='=' value='1' CONFIG ORIGINAL
pair modifier='debug.parser' name='rc' raw='rc.debug.parser=1' separator='=' value='1' CONFIG ORIGINAL
op raw='(' ORIGINAL FILTER
op raw='(' ORIGINAL FILTER
tag name='ACTIVE' raw='+ACTIVE' sign='+' ORIGINAL FILTER
op raw=')' ORIGINAL FILTER
op raw=')' ORIGINAL FILTER
identifier canonical='stop' raw='stop' ORIGINAL CMD USESCONTEXT ALLOWSFILTER ALLOWSMODIFICATIONS

Filtered 1 tasks --> 1 tasks [all tasks]
Task::modify
pending.data rw O T0001+000001 L0001+000
completed.data rw - T0000+000
000 L0000+000
undo.data rw O T0000+000000 L0004+004
backlog.data rw O T0000+000
000 L0001+001

Perf task 2.5.0.beta2 f53f4ce 20150924T124631Z init:1887 load:62 gc:0 filter:257 commit:58 sort:0 render:0 hooks:0 other:274 total:2538

Using alternate data.location /tmp/ttask
Configuration override rc.data.location:/tmp/ttask
Configuration override rc.debug:1
Configuration override rc.debug.parser:1
{code}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
type:bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant