# Imported anchors not working

**URL:** https://travis-ci.community/t/imported-anchors-not-working/10035
**Category:** Early Releases
**Tags:** config-import
**Created:** [September 29, 2020, 12:02pm UTC](https://travis-ci.community/t/imported-anchors-not-working/10035 "2020-09-29T12:02:21Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![roman.hosek](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/roman.hosek/32/5244_2.png) [@roman.hosek](https://travis-ci.community/u/roman.hosek)
#### Post date: [September 29, 2020, 12:02pm UTC](https://travis-ci.community/t/imported-anchors-not-working/10035/1 "2020-09-29T12:02:21Z")

</div>

Hi, I have problem to make anchors working if config is imported.  
If I import classic jobs, everything is working fine, but when I import just anchors instead, then aliases in project file are not working (run dummy job)  
Is this functionality supported in Travis?

Example:  
Private repo config base.yml:

```
version: ~> 1.0

_job_test: &_job_test
  name: "Test"
  stage: Test
  script: run_test.sh

```

Project config file:

```
version: ~> 1.0
import:
  - me/private-repo:base.yml

jobs: 
  include:
    - <<: *_job_test

```

Thanks for any hint!

---

<div class="post-metadata">

### Author: ![native-api](https://sea1.discourse-cdn.com/flex015/user_avatar/travis-ci.community/native-api/32/430_2.png) [@native-api](https://travis-ci.community/u/native-api)
#### Post date: [September 29, 2020, 2:55pm UTC](https://travis-ci.community/t/imported-anchors-not-working/10035/2 "2020-09-29T14:55:03Z")

</div>

This is not supported. [Anchors and aliases are an internal detail in YAML 1.1 – when a YAML is parsed, all aliases are expanded using corresponding anchors and neither are present in the parse result.](https://yaml.org/spec/1.1/current.html#id863390)

Travis combines parse trees rather than raw text (since it needs to parse the file to find out whether it needs to import anything) so it cannot do anything about anchors at that point.
